diff --git a/sdk/python/sdk/zrok/.gitignore b/sdk/python/sdk/zrok/.gitignore
index a655050c..43995bd4 100644
--- a/sdk/python/sdk/zrok/.gitignore
+++ b/sdk/python/sdk/zrok/.gitignore
@@ -45,7 +45,9 @@ coverage.xml
*,cover
.hypothesis/
venv/
+.venv/
.python-version
+.pytest_cache
# Translations
*.mo
diff --git a/sdk/python/sdk/zrok/.openapi-generator/FILES b/sdk/python/sdk/zrok/.openapi-generator/FILES
new file mode 100644
index 00000000..1b02d80f
--- /dev/null
+++ b/sdk/python/sdk/zrok/.openapi-generator/FILES
@@ -0,0 +1,125 @@
+.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/__init__.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/sdk/zrok/.openapi-generator/VERSION b/sdk/python/sdk/zrok/.openapi-generator/VERSION
new file mode 100644
index 00000000..1985849f
--- /dev/null
+++ b/sdk/python/sdk/zrok/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.7.0
diff --git a/sdk/python/sdk/zrok/.swagger-codegen-ignore b/sdk/python/sdk/zrok/.swagger-codegen-ignore
deleted file mode 100644
index f86cf33f..00000000
--- a/sdk/python/sdk/zrok/.swagger-codegen-ignore
+++ /dev/null
@@ -1,32 +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
-
-.travis.yml
-git_push.sh
-tox.ini
-test-requirements.txt
-test/
-docs/
-README.md
-setup.py
diff --git a/sdk/python/sdk/zrok/README.md b/sdk/python/sdk/zrok/README.md
index 1ec5f374..b337c9e0 100644
--- a/sdk/python/sdk/zrok/README.md
+++ b/sdk/python/sdk/zrok/README.md
@@ -1,21 +1,21 @@
# zrok_sdk
-
zrok client access
-This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
+This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 1.0.0
- Package version: 1.0.0
-- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
+- Generator version: 7.7.0
+- Build package: org.openapitools.codegen.languages.PythonClientCodegen
## Requirements.
-Python 2.7 and 3.4+
+Python 3.7+
## Installation & Usage
### pip install
-If the python package is hosted on Github, you can install directly from Github
+If the python package is hosted on a repository, you can install directly using:
```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
@@ -24,7 +24,7 @@ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
Then import the package:
```python
-import zrok_api
+import zrok_api
```
### Setuptools
@@ -41,104 +41,49 @@ Then import the package:
import zrok_api
```
+### Tests
+
+Execute `pytest` to run the tests.
+
## 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'
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
-# 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)
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = '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)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AccountApi(api_client)
+ body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional)
-# create an instance of the API class
-api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration))
-body = zrok_api.RegisterBody() # RegisterBody | (optional)
+ try:
+ api_instance.change_password(body=body)
+ except ApiException as e:
+ print("Exception when calling AccountApi->change_password: %s\n" % e)
-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
@@ -194,76 +139,69 @@ Class | Method | HTTP request | Description
*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)
+ - [Access201Response](docs/Access201Response.md)
+ - [AccessRequest](docs/AccessRequest.md)
+ - [AddOrganizationMemberRequest](docs/AddOrganizationMemberRequest.md)
- [AuthUser](docs/AuthUser.md)
- - [ChangePasswordBody](docs/ChangePasswordBody.md)
- - [ClientVersionCheckBody](docs/ClientVersionCheckBody.md)
+ - [ChangePasswordRequest](docs/ChangePasswordRequest.md)
+ - [ClientVersionCheckRequest](docs/ClientVersionCheckRequest.md)
- [Configuration](docs/Configuration.md)
- - [DisableBody](docs/DisableBody.md)
- - [EnableBody](docs/EnableBody.md)
+ - [CreateFrontend201Response](docs/CreateFrontend201Response.md)
+ - [CreateFrontendRequest](docs/CreateFrontendRequest.md)
+ - [CreateIdentity201Response](docs/CreateIdentity201Response.md)
+ - [CreateIdentityRequest](docs/CreateIdentityRequest.md)
+ - [CreateOrganization201Response](docs/CreateOrganization201Response.md)
+ - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md)
+ - [DisableRequest](docs/DisableRequest.md)
+ - [EnableRequest](docs/EnableRequest.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)
+ - [GetSparklines200Response](docs/GetSparklines200Response.md)
+ - [GetSparklinesRequest](docs/GetSparklinesRequest.md)
+ - [InviteRequest](docs/InviteRequest.md)
+ - [InviteTokenGenerateRequest](docs/InviteTokenGenerateRequest.md)
+ - [ListFrontends200ResponseInner](docs/ListFrontends200ResponseInner.md)
+ - [ListMemberships200Response](docs/ListMemberships200Response.md)
+ - [ListMemberships200ResponseMembershipsInner](docs/ListMemberships200ResponseMembershipsInner.md)
+ - [ListOrganizationMembers200Response](docs/ListOrganizationMembers200Response.md)
+ - [ListOrganizationMembers200ResponseMembersInner](docs/ListOrganizationMembers200ResponseMembersInner.md)
+ - [ListOrganizations200Response](docs/ListOrganizations200Response.md)
+ - [ListOrganizations200ResponseOrganizationsInner](docs/ListOrganizations200ResponseOrganizationsInner.md)
+ - [LoginRequest](docs/LoginRequest.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)
+ - [RegenerateAccountToken200Response](docs/RegenerateAccountToken200Response.md)
+ - [RegenerateAccountTokenRequest](docs/RegenerateAccountTokenRequest.md)
+ - [RegisterRequest](docs/RegisterRequest.md)
+ - [RemoveOrganizationMemberRequest](docs/RemoveOrganizationMemberRequest.md)
+ - [ResetPasswordRequest](docs/ResetPasswordRequest.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)
+ - [UnaccessRequest](docs/UnaccessRequest.md)
+ - [UnshareRequest](docs/UnshareRequest.md)
+ - [UpdateAccessRequest](docs/UpdateAccessRequest.md)
+ - [UpdateFrontendRequest](docs/UpdateFrontendRequest.md)
+ - [UpdateShareRequest](docs/UpdateShareRequest.md)
+ - [Verify200Response](docs/Verify200Response.md)
+ - [VerifyRequest](docs/VerifyRequest.md)
+ - [VersionInventory200Response](docs/VersionInventory200Response.md)
+
+
## Documentation For Authorization
-## key
+Authentication schemes defined for the API:
+
+### key
- **Type**: API key
- **API key parameter name**: x-token
@@ -273,3 +211,5 @@ Class | Method | HTTP request | Description
## Author
+
+
diff --git a/sdk/python/sdk/zrok/docs/Access201Response.md b/sdk/python/sdk/zrok/docs/Access201Response.md
new file mode 100644
index 00000000..bc12a97a
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/Access201Response.md
@@ -0,0 +1,30 @@
+# Access201Response
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**frontend_token** | **str** | | [optional]
+**backend_mode** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.access201_response import Access201Response
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Access201Response from a JSON string
+access201_response_instance = Access201Response.from_json(json)
+# print the JSON string representation of the object
+print(Access201Response.to_json())
+
+# convert the object into a dict
+access201_response_dict = access201_response_instance.to_dict()
+# create an instance of Access201Response from a dict
+access201_response_from_dict = Access201Response.from_dict(access201_response_dict)
+```
+[[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/AccessRequest.md b/sdk/python/sdk/zrok/docs/AccessRequest.md
new file mode 100644
index 00000000..288b82ae
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/AccessRequest.md
@@ -0,0 +1,32 @@
+# AccessRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**env_zid** | **str** | | [optional]
+**share_token** | **str** | | [optional]
+**bind_address** | **str** | | [optional]
+**description** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.access_request import AccessRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of AccessRequest from a JSON string
+access_request_instance = AccessRequest.from_json(json)
+# print the JSON string representation of the object
+print(AccessRequest.to_json())
+
+# convert the object into a dict
+access_request_dict = access_request_instance.to_dict()
+# create an instance of AccessRequest from a dict
+access_request_from_dict = AccessRequest.from_dict(access_request_dict)
+```
+[[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
index 531caa12..669bfbc6 100644
--- a/sdk/python/sdk/zrok/docs/AccountApi.md
+++ b/sdk/python/sdk/zrok/docs/AccountApi.md
@@ -13,40 +13,59 @@ Method | HTTP request | Description
[**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest |
[**verify**](AccountApi.md#verify) | **POST** /verify |
+
# **change_password**
> change_password(body=body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.change_password_request import ChangePasswordRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration))
-body = zrok_api.ChangePasswordBody() # ChangePasswordBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AccountApi(api_client)
+ body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional)
-try:
- api_instance.change_password(body=body)
-except ApiException as e:
- print("Exception when calling AccountApi->change_password: %s\n" % e)
+ try:
+ api_instance.change_password(body=body)
+ except Exception as e:
+ print("Exception when calling AccountApi->change_password: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**ChangePasswordBody**](ChangePasswordBody.md)| | [optional]
+ **body** | [**ChangePasswordRequest**](ChangePasswordRequest.md)| | [optional]
### Return type
@@ -61,6 +80,16 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | password changed | - |
+**400** | password not changed | - |
+**401** | unauthorized | - |
+**422** | password validation failure | - |
+**500** | internal server error | - |
+
[[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**
@@ -69,28 +98,41 @@ void (empty response body)
### Example
+
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.invite_request import InviteRequest
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)
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
-try:
- api_instance.invite(body=body)
-except ApiException as e:
- print("Exception when calling AccountApi->invite: %s\n" % e)
+
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AccountApi(api_client)
+ body = zrok_api.InviteRequest() # InviteRequest | (optional)
+
+ try:
+ api_instance.invite(body=body)
+ except Exception as e:
+ print("Exception when calling AccountApi->invite: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**InviteBody**](InviteBody.md)| | [optional]
+ **body** | [**InviteRequest**](InviteRequest.md)| | [optional]
### Return type
@@ -105,6 +147,15 @@ No authorization required
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | invitation created | - |
+**400** | invitation not created (already exists) | - |
+**401** | unauthorized | - |
+**500** | internal server error | - |
+
[[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**
@@ -113,29 +164,43 @@ No authorization required
### Example
+
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.login_request import LoginRequest
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)
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
-try:
- api_response = api_instance.login(body=body)
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling AccountApi->login: %s\n" % e)
+
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AccountApi(api_client)
+ body = zrok_api.LoginRequest() # LoginRequest | (optional)
+
+ try:
+ api_response = api_instance.login(body=body)
+ print("The response of AccountApi->login:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AccountApi->login: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**LoginBody**](LoginBody.md)| | [optional]
+ **body** | [**LoginRequest**](LoginRequest.md)| | [optional]
### Return type
@@ -150,47 +215,74 @@ No authorization required
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | login successful | - |
+**401** | invalid login | - |
+
[[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)
+> RegenerateAccountToken200Response regenerate_account_token(body=body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response
+from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration))
-body = zrok_api.RegenerateAccountTokenBody() # RegenerateAccountTokenBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AccountApi(api_client)
+ body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (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)
+ try:
+ api_response = api_instance.regenerate_account_token(body=body)
+ print("The response of AccountApi->regenerate_account_token:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**RegenerateAccountTokenBody**](RegenerateAccountTokenBody.md)| | [optional]
+ **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional]
### Return type
-[**InlineResponse200**](InlineResponse200.md)
+[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md)
### Authorization
@@ -201,41 +293,64 @@ Name | Type | Description | Notes
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | regenerate account token | - |
+**404** | account not found | - |
+**500** | internal server error | - |
+
[[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)
+> RegenerateAccountToken200Response register(body=body)
### Example
+
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response
+from zrok_api.models.register_request import RegisterRequest
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)
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
-try:
- api_response = api_instance.register(body=body)
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling AccountApi->register: %s\n" % e)
+
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AccountApi(api_client)
+ body = zrok_api.RegisterRequest() # RegisterRequest | (optional)
+
+ try:
+ api_response = api_instance.register(body=body)
+ print("The response of AccountApi->register:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AccountApi->register: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**RegisterBody**](RegisterBody.md)| | [optional]
+ **body** | [**RegisterRequest**](RegisterRequest.md)| | [optional]
### Return type
-[**InlineResponse200**](InlineResponse200.md)
+[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md)
### Authorization
@@ -246,6 +361,15 @@ No authorization required
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | account created | - |
+**404** | request not found | - |
+**422** | password validation failure | - |
+**500** | internal server error | - |
+
[[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**
@@ -254,28 +378,41 @@ No authorization required
### Example
+
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.reset_password_request import ResetPasswordRequest
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)
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
-try:
- api_instance.reset_password(body=body)
-except ApiException as e:
- print("Exception when calling AccountApi->reset_password: %s\n" % e)
+
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AccountApi(api_client)
+ body = zrok_api.ResetPasswordRequest() # ResetPasswordRequest | (optional)
+
+ try:
+ api_instance.reset_password(body=body)
+ except Exception as e:
+ print("Exception when calling AccountApi->reset_password: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**ResetPasswordBody**](ResetPasswordBody.md)| | [optional]
+ **body** | [**ResetPasswordRequest**](ResetPasswordRequest.md)| | [optional]
### Return type
@@ -290,6 +427,15 @@ No authorization required
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | password reset | - |
+**404** | request not found | - |
+**422** | password validation failure | - |
+**500** | internal server error | - |
+
[[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**
@@ -298,28 +444,41 @@ No authorization required
### Example
+
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest
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)
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
-try:
- api_instance.reset_password_request(body=body)
-except ApiException as e:
- print("Exception when calling AccountApi->reset_password_request: %s\n" % e)
+
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AccountApi(api_client)
+ body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional)
+
+ try:
+ api_instance.reset_password_request(body=body)
+ except Exception as e:
+ print("Exception when calling AccountApi->reset_password_request: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**ResetPasswordRequestBody**](ResetPasswordRequestBody.md)| | [optional]
+ **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional]
### Return type
@@ -334,41 +493,64 @@ No authorization required
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | reset password request created | - |
+**400** | reset password request not created | - |
+**500** | internal server error | - |
+
[[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)
+> Verify200Response verify(body=body)
### Example
+
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.verify200_response import Verify200Response
+from zrok_api.models.verify_request import VerifyRequest
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)
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
-try:
- api_response = api_instance.verify(body=body)
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling AccountApi->verify: %s\n" % e)
+
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AccountApi(api_client)
+ body = zrok_api.VerifyRequest() # VerifyRequest | (optional)
+
+ try:
+ api_response = api_instance.verify(body=body)
+ print("The response of AccountApi->verify:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AccountApi->verify: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**VerifyBody**](VerifyBody.md)| | [optional]
+ **body** | [**VerifyRequest**](VerifyRequest.md)| | [optional]
### Return type
-[**InlineResponse2001**](InlineResponse2001.md)
+[**Verify200Response**](Verify200Response.md)
### Authorization
@@ -379,5 +561,13 @@ No authorization required
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | registration token ready | - |
+**404** | registration token not found | - |
+**500** | internal server error | - |
+
[[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/AddOrganizationMemberRequest.md b/sdk/python/sdk/zrok/docs/AddOrganizationMemberRequest.md
new file mode 100644
index 00000000..c866784a
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/AddOrganizationMemberRequest.md
@@ -0,0 +1,31 @@
+# AddOrganizationMemberRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**organization_token** | **str** | | [optional]
+**email** | **str** | | [optional]
+**admin** | **bool** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of AddOrganizationMemberRequest from a JSON string
+add_organization_member_request_instance = AddOrganizationMemberRequest.from_json(json)
+# print the JSON string representation of the object
+print(AddOrganizationMemberRequest.to_json())
+
+# convert the object into a dict
+add_organization_member_request_dict = add_organization_member_request_instance.to_dict()
+# create an instance of AddOrganizationMemberRequest from a dict
+add_organization_member_request_from_dict = AddOrganizationMemberRequest.from_dict(add_organization_member_request_dict)
+```
+[[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
index 34977dd4..153aa3ea 100644
--- a/sdk/python/sdk/zrok/docs/AdminApi.md
+++ b/sdk/python/sdk/zrok/docs/AdminApi.md
@@ -19,40 +19,59 @@ Method | HTTP request | Description
[**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
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.OrganizationAddBody() # OrganizationAddBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.AddOrganizationMemberRequest() # AddOrganizationMemberRequest | (optional)
-try:
- api_instance.add_organization_member(body=body)
-except ApiException as e:
- print("Exception when calling AdminApi->add_organization_member: %s\n" % e)
+ try:
+ api_instance.add_organization_member(body=body)
+ except Exception as e:
+ print("Exception when calling AdminApi->add_organization_member: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OrganizationAddBody**](OrganizationAddBody.md)| | [optional]
+ **body** | [**AddOrganizationMemberRequest**](AddOrganizationMemberRequest.md)| | [optional]
### Return type
@@ -67,47 +86,76 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | member added | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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)
+> RegenerateAccountToken200Response create_account(body=body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.login_request import LoginRequest
+from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.AccountBody() # AccountBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.LoginRequest() # LoginRequest | (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)
+ try:
+ api_response = api_instance.create_account(body=body)
+ print("The response of AdminApi->create_account:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AdminApi->create_account: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**AccountBody**](AccountBody.md)| | [optional]
+ **body** | [**LoginRequest**](LoginRequest.md)| | [optional]
### Return type
-[**InlineResponse200**](InlineResponse200.md)
+[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md)
### Authorization
@@ -118,47 +166,75 @@ Name | Type | Description | Notes
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | created | - |
+**401** | unauthorized | - |
+**500** | internal server error | - |
+
[[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)
+> CreateFrontend201Response create_frontend(body=body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.create_frontend201_response import CreateFrontend201Response
+from zrok_api.models.create_frontend_request import CreateFrontendRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.FrontendBody() # FrontendBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.CreateFrontendRequest() # CreateFrontendRequest | (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)
+ try:
+ api_response = api_instance.create_frontend(body=body)
+ print("The response of AdminApi->create_frontend:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AdminApi->create_frontend: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**FrontendBody**](FrontendBody.md)| | [optional]
+ **body** | [**CreateFrontendRequest**](CreateFrontendRequest.md)| | [optional]
### Return type
-[**InlineResponse201**](InlineResponse201.md)
+[**CreateFrontend201Response**](CreateFrontend201Response.md)
### Authorization
@@ -169,47 +245,77 @@ Name | Type | Description | Notes
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | frontend created | - |
+**400** | bad request | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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)
+> CreateIdentity201Response create_identity(body=body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.create_identity201_response import CreateIdentity201Response
+from zrok_api.models.create_identity_request import CreateIdentityRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.IdentityBody() # IdentityBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.CreateIdentityRequest() # CreateIdentityRequest | (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)
+ try:
+ api_response = api_instance.create_identity(body=body)
+ print("The response of AdminApi->create_identity:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AdminApi->create_identity: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**IdentityBody**](IdentityBody.md)| | [optional]
+ **body** | [**CreateIdentityRequest**](CreateIdentityRequest.md)| | [optional]
### Return type
-[**InlineResponse2011**](InlineResponse2011.md)
+[**CreateIdentity201Response**](CreateIdentity201Response.md)
### Authorization
@@ -220,47 +326,75 @@ Name | Type | Description | Notes
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | created | - |
+**401** | unauthorized | - |
+**500** | internal server error | - |
+
[[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)
+> CreateOrganization201Response create_organization(body=body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.create_organization201_response import CreateOrganization201Response
+from zrok_api.models.create_organization_request import CreateOrganizationRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.OrganizationBody() # OrganizationBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.CreateOrganizationRequest() # CreateOrganizationRequest | (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)
+ try:
+ api_response = api_instance.create_organization(body=body)
+ print("The response of AdminApi->create_organization:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AdminApi->create_organization: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OrganizationBody**](OrganizationBody.md)| | [optional]
+ **body** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md)| | [optional]
### Return type
-[**InlineResponse2012**](InlineResponse2012.md)
+[**CreateOrganization201Response**](CreateOrganization201Response.md)
### Authorization
@@ -271,6 +405,14 @@ Name | Type | Description | Notes
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | organization created | - |
+**401** | unauthorized | - |
+**500** | internal server error | - |
+
[[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**
@@ -279,34 +421,52 @@ Name | Type | Description | Notes
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.create_frontend201_response import CreateFrontend201Response
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.FrontendBody1() # FrontendBody1 | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.CreateFrontend201Response() # CreateFrontend201Response | (optional)
-try:
- api_instance.delete_frontend(body=body)
-except ApiException as e:
- print("Exception when calling AdminApi->delete_frontend: %s\n" % e)
+ try:
+ api_instance.delete_frontend(body=body)
+ except Exception as e:
+ print("Exception when calling AdminApi->delete_frontend: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**FrontendBody1**](FrontendBody1.md)| | [optional]
+ **body** | [**CreateFrontend201Response**](CreateFrontend201Response.md)| | [optional]
### Return type
@@ -321,6 +481,15 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | frontend deleted | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -329,34 +498,52 @@ void (empty response body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.create_organization201_response import CreateOrganization201Response
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.OrganizationBody1() # OrganizationBody1 | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional)
-try:
- api_instance.delete_organization(body=body)
-except ApiException as e:
- print("Exception when calling AdminApi->delete_organization: %s\n" % e)
+ try:
+ api_instance.delete_organization(body=body)
+ except Exception as e:
+ print("Exception when calling AdminApi->delete_organization: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OrganizationBody1**](OrganizationBody1.md)| | [optional]
+ **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional]
### Return type
@@ -371,6 +558,15 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | organization deleted | - |
+**401** | unauthorized | - |
+**404** | organization not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -379,34 +575,52 @@ void (empty response body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.verify200_response import Verify200Response
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.GrantsBody() # GrantsBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.Verify200Response() # Verify200Response | (optional)
-try:
- api_instance.grants(body=body)
-except ApiException as e:
- print("Exception when calling AdminApi->grants: %s\n" % e)
+ try:
+ api_instance.grants(body=body)
+ except Exception as e:
+ print("Exception when calling AdminApi->grants: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**GrantsBody**](GrantsBody.md)| | [optional]
+ **body** | [**Verify200Response**](Verify200Response.md)| | [optional]
### Return type
@@ -421,6 +635,15 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | ok | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -429,34 +652,52 @@ void (empty response body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.TokenGenerateBody() # TokenGenerateBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.InviteTokenGenerateRequest() # InviteTokenGenerateRequest | (optional)
-try:
- api_instance.invite_token_generate(body=body)
-except ApiException as e:
- print("Exception when calling AdminApi->invite_token_generate: %s\n" % e)
+ try:
+ api_instance.invite_token_generate(body=body)
+ except Exception as e:
+ print("Exception when calling AdminApi->invite_token_generate: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**TokenGenerateBody**](TokenGenerateBody.md)| | [optional]
+ **body** | [**InviteTokenGenerateRequest**](InviteTokenGenerateRequest.md)| | [optional]
### Return type
@@ -471,43 +712,71 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | invite tokens created | - |
+**400** | invite tokens not created | - |
+**401** | unauthorized | - |
+**500** | internal server error | - |
+
[[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()
+> List[ListFrontends200ResponseInner] list_frontends()
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
-try:
- api_response = api_instance.list_frontends()
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling AdminApi->list_frontends: %s\n" % e)
+ try:
+ api_response = api_instance.list_frontends()
+ print("The response of AdminApi->list_frontends:\n")
+ pprint(api_response)
+ except Exception 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)
+[**List[ListFrontends200ResponseInner]**](ListFrontends200ResponseInner.md)
### Authorization
@@ -518,47 +787,75 @@ This endpoint does not need any parameter.
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | ok | - |
+**401** | unauthorized | - |
+**500** | internal server error | - |
+
[[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)
+> ListOrganizationMembers200Response list_organization_members(body=body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.create_organization201_response import CreateOrganization201Response
+from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.OrganizationListBody() # OrganizationListBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (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)
+ try:
+ api_response = api_instance.list_organization_members(body=body)
+ print("The response of AdminApi->list_organization_members:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AdminApi->list_organization_members: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OrganizationListBody**](OrganizationListBody.md)| | [optional]
+ **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional]
### Return type
-[**InlineResponse2003**](InlineResponse2003.md)
+[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md)
### Authorization
@@ -569,43 +866,71 @@ Name | Type | Description | Notes
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | list organization members | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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()
+> ListOrganizations200Response list_organizations()
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.list_organizations200_response import ListOrganizations200Response
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
-try:
- api_response = api_instance.list_organizations()
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling AdminApi->list_organizations: %s\n" % e)
+ try:
+ api_response = api_instance.list_organizations()
+ print("The response of AdminApi->list_organizations:\n")
+ pprint(api_response)
+ except Exception 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)
+[**ListOrganizations200Response**](ListOrganizations200Response.md)
### Authorization
@@ -616,6 +941,14 @@ This endpoint does not need any parameter.
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | ok | - |
+**401** | unauthorized | - |
+**500** | internal server error | - |
+
[[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**
@@ -624,34 +957,52 @@ This endpoint does not need any parameter.
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.OrganizationRemoveBody() # OrganizationRemoveBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.RemoveOrganizationMemberRequest() # RemoveOrganizationMemberRequest | (optional)
-try:
- api_instance.remove_organization_member(body=body)
-except ApiException as e:
- print("Exception when calling AdminApi->remove_organization_member: %s\n" % e)
+ try:
+ api_instance.remove_organization_member(body=body)
+ except Exception as e:
+ print("Exception when calling AdminApi->remove_organization_member: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OrganizationRemoveBody**](OrganizationRemoveBody.md)| | [optional]
+ **body** | [**RemoveOrganizationMemberRequest**](RemoveOrganizationMemberRequest.md)| | [optional]
### Return type
@@ -666,6 +1017,15 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | member removed | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -674,34 +1034,52 @@ void (empty response body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.update_frontend_request import UpdateFrontendRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration))
-body = zrok_api.FrontendBody2() # FrontendBody2 | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.AdminApi(api_client)
+ body = zrok_api.UpdateFrontendRequest() # UpdateFrontendRequest | (optional)
-try:
- api_instance.update_frontend(body=body)
-except ApiException as e:
- print("Exception when calling AdminApi->update_frontend: %s\n" % e)
+ try:
+ api_instance.update_frontend(body=body)
+ except Exception as e:
+ print("Exception when calling AdminApi->update_frontend: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**FrontendBody2**](FrontendBody2.md)| | [optional]
+ **body** | [**UpdateFrontendRequest**](UpdateFrontendRequest.md)| | [optional]
### Return type
@@ -716,5 +1094,14 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | frontend updated | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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
index 2abe24ba..99960687 100644
--- a/sdk/python/sdk/zrok/docs/AuthUser.md
+++ b/sdk/python/sdk/zrok/docs/AuthUser.md
@@ -1,10 +1,30 @@
# AuthUser
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**username** | **str** | | [optional]
**password** | **str** | | [optional]
+## Example
+
+```python
+from zrok_api.models.auth_user import AuthUser
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of AuthUser from a JSON string
+auth_user_instance = AuthUser.from_json(json)
+# print the JSON string representation of the object
+print(AuthUser.to_json())
+
+# convert the object into a dict
+auth_user_dict = auth_user_instance.to_dict()
+# create an instance of AuthUser from a dict
+auth_user_from_dict = AuthUser.from_dict(auth_user_dict)
+```
[[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/ChangePasswordRequest.md b/sdk/python/sdk/zrok/docs/ChangePasswordRequest.md
new file mode 100644
index 00000000..5fea099e
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/ChangePasswordRequest.md
@@ -0,0 +1,31 @@
+# ChangePasswordRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | | [optional]
+**old_password** | **str** | | [optional]
+**new_password** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.change_password_request import ChangePasswordRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ChangePasswordRequest from a JSON string
+change_password_request_instance = ChangePasswordRequest.from_json(json)
+# print the JSON string representation of the object
+print(ChangePasswordRequest.to_json())
+
+# convert the object into a dict
+change_password_request_dict = change_password_request_instance.to_dict()
+# create an instance of ChangePasswordRequest from a dict
+change_password_request_from_dict = ChangePasswordRequest.from_dict(change_password_request_dict)
+```
+[[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/ClientVersionCheckRequest.md b/sdk/python/sdk/zrok/docs/ClientVersionCheckRequest.md
new file mode 100644
index 00000000..53d9e16e
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/ClientVersionCheckRequest.md
@@ -0,0 +1,29 @@
+# ClientVersionCheckRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**client_version** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.client_version_check_request import ClientVersionCheckRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ClientVersionCheckRequest from a JSON string
+client_version_check_request_instance = ClientVersionCheckRequest.from_json(json)
+# print the JSON string representation of the object
+print(ClientVersionCheckRequest.to_json())
+
+# convert the object into a dict
+client_version_check_request_dict = client_version_check_request_instance.to_dict()
+# create an instance of ClientVersionCheckRequest from a dict
+client_version_check_request_from_dict = ClientVersionCheckRequest.from_dict(client_version_check_request_dict)
+```
+[[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
index ee94f24b..07eec945 100644
--- a/sdk/python/sdk/zrok/docs/Configuration.md
+++ b/sdk/python/sdk/zrok/docs/Configuration.md
@@ -1,6 +1,8 @@
# Configuration
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**version** | **str** | | [optional]
@@ -9,5 +11,23 @@ Name | Type | Description | Notes
**requires_invite_token** | **bool** | | [optional]
**invite_token_contact** | **str** | | [optional]
+## Example
+
+```python
+from zrok_api.models.configuration import Configuration
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Configuration from a JSON string
+configuration_instance = Configuration.from_json(json)
+# print the JSON string representation of the object
+print(Configuration.to_json())
+
+# convert the object into a dict
+configuration_dict = configuration_instance.to_dict()
+# create an instance of Configuration from a dict
+configuration_from_dict = Configuration.from_dict(configuration_dict)
+```
[[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/CreateFrontend201Response.md b/sdk/python/sdk/zrok/docs/CreateFrontend201Response.md
new file mode 100644
index 00000000..7239add1
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/CreateFrontend201Response.md
@@ -0,0 +1,29 @@
+# CreateFrontend201Response
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**frontend_token** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.create_frontend201_response import CreateFrontend201Response
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateFrontend201Response from a JSON string
+create_frontend201_response_instance = CreateFrontend201Response.from_json(json)
+# print the JSON string representation of the object
+print(CreateFrontend201Response.to_json())
+
+# convert the object into a dict
+create_frontend201_response_dict = create_frontend201_response_instance.to_dict()
+# create an instance of CreateFrontend201Response from a dict
+create_frontend201_response_from_dict = CreateFrontend201Response.from_dict(create_frontend201_response_dict)
+```
+[[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/CreateFrontendRequest.md b/sdk/python/sdk/zrok/docs/CreateFrontendRequest.md
new file mode 100644
index 00000000..63fe8779
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/CreateFrontendRequest.md
@@ -0,0 +1,32 @@
+# CreateFrontendRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**z_id** | **str** | | [optional]
+**url_template** | **str** | | [optional]
+**public_name** | **str** | | [optional]
+**permission_mode** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.create_frontend_request import CreateFrontendRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateFrontendRequest from a JSON string
+create_frontend_request_instance = CreateFrontendRequest.from_json(json)
+# print the JSON string representation of the object
+print(CreateFrontendRequest.to_json())
+
+# convert the object into a dict
+create_frontend_request_dict = create_frontend_request_instance.to_dict()
+# create an instance of CreateFrontendRequest from a dict
+create_frontend_request_from_dict = CreateFrontendRequest.from_dict(create_frontend_request_dict)
+```
+[[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/CreateIdentity201Response.md b/sdk/python/sdk/zrok/docs/CreateIdentity201Response.md
new file mode 100644
index 00000000..245275e2
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/CreateIdentity201Response.md
@@ -0,0 +1,30 @@
+# CreateIdentity201Response
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**identity** | **str** | | [optional]
+**cfg** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.create_identity201_response import CreateIdentity201Response
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateIdentity201Response from a JSON string
+create_identity201_response_instance = CreateIdentity201Response.from_json(json)
+# print the JSON string representation of the object
+print(CreateIdentity201Response.to_json())
+
+# convert the object into a dict
+create_identity201_response_dict = create_identity201_response_instance.to_dict()
+# create an instance of CreateIdentity201Response from a dict
+create_identity201_response_from_dict = CreateIdentity201Response.from_dict(create_identity201_response_dict)
+```
+[[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/CreateIdentityRequest.md b/sdk/python/sdk/zrok/docs/CreateIdentityRequest.md
new file mode 100644
index 00000000..50cb9457
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/CreateIdentityRequest.md
@@ -0,0 +1,29 @@
+# CreateIdentityRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.create_identity_request import CreateIdentityRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateIdentityRequest from a JSON string
+create_identity_request_instance = CreateIdentityRequest.from_json(json)
+# print the JSON string representation of the object
+print(CreateIdentityRequest.to_json())
+
+# convert the object into a dict
+create_identity_request_dict = create_identity_request_instance.to_dict()
+# create an instance of CreateIdentityRequest from a dict
+create_identity_request_from_dict = CreateIdentityRequest.from_dict(create_identity_request_dict)
+```
+[[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/CreateOrganization201Response.md b/sdk/python/sdk/zrok/docs/CreateOrganization201Response.md
new file mode 100644
index 00000000..26bc640c
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/CreateOrganization201Response.md
@@ -0,0 +1,29 @@
+# CreateOrganization201Response
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**organization_token** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.create_organization201_response import CreateOrganization201Response
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateOrganization201Response from a JSON string
+create_organization201_response_instance = CreateOrganization201Response.from_json(json)
+# print the JSON string representation of the object
+print(CreateOrganization201Response.to_json())
+
+# convert the object into a dict
+create_organization201_response_dict = create_organization201_response_instance.to_dict()
+# create an instance of CreateOrganization201Response from a dict
+create_organization201_response_from_dict = CreateOrganization201Response.from_dict(create_organization201_response_dict)
+```
+[[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/CreateOrganizationRequest.md b/sdk/python/sdk/zrok/docs/CreateOrganizationRequest.md
new file mode 100644
index 00000000..458e339b
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/CreateOrganizationRequest.md
@@ -0,0 +1,29 @@
+# CreateOrganizationRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**description** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.create_organization_request import CreateOrganizationRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateOrganizationRequest from a JSON string
+create_organization_request_instance = CreateOrganizationRequest.from_json(json)
+# print the JSON string representation of the object
+print(CreateOrganizationRequest.to_json())
+
+# convert the object into a dict
+create_organization_request_dict = create_organization_request_instance.to_dict()
+# create an instance of CreateOrganizationRequest from a dict
+create_organization_request_from_dict = CreateOrganizationRequest.from_dict(create_organization_request_dict)
+```
+[[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/DisableRequest.md b/sdk/python/sdk/zrok/docs/DisableRequest.md
new file mode 100644
index 00000000..4e4490f1
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/DisableRequest.md
@@ -0,0 +1,29 @@
+# DisableRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**identity** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.disable_request import DisableRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of DisableRequest from a JSON string
+disable_request_instance = DisableRequest.from_json(json)
+# print the JSON string representation of the object
+print(DisableRequest.to_json())
+
+# convert the object into a dict
+disable_request_dict = disable_request_instance.to_dict()
+# create an instance of DisableRequest from a dict
+disable_request_from_dict = DisableRequest.from_dict(disable_request_dict)
+```
+[[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/EnableRequest.md b/sdk/python/sdk/zrok/docs/EnableRequest.md
new file mode 100644
index 00000000..7720b3b9
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/EnableRequest.md
@@ -0,0 +1,30 @@
+# EnableRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**description** | **str** | | [optional]
+**host** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.enable_request import EnableRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of EnableRequest from a JSON string
+enable_request_instance = EnableRequest.from_json(json)
+# print the JSON string representation of the object
+print(EnableRequest.to_json())
+
+# convert the object into a dict
+enable_request_dict = enable_request_instance.to_dict()
+# create an instance of EnableRequest from a dict
+enable_request_from_dict = EnableRequest.from_dict(enable_request_dict)
+```
+[[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
index bd71fee9..44a9356b 100644
--- a/sdk/python/sdk/zrok/docs/Environment.md
+++ b/sdk/python/sdk/zrok/docs/Environment.md
@@ -1,16 +1,36 @@
# Environment
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **str** | | [optional]
**host** | **str** | | [optional]
**address** | **str** | | [optional]
**z_id** | **str** | | [optional]
-**activity** | [**SparkData**](SparkData.md) | | [optional]
+**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional]
**limited** | **bool** | | [optional]
**created_at** | **int** | | [optional]
**updated_at** | **int** | | [optional]
+## Example
+
+```python
+from zrok_api.models.environment import Environment
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Environment from a JSON string
+environment_instance = Environment.from_json(json)
+# print the JSON string representation of the object
+print(Environment.to_json())
+
+# convert the object into a dict
+environment_dict = environment_instance.to_dict()
+# create an instance of Environment from a dict
+environment_from_dict = Environment.from_dict(environment_dict)
+```
[[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
index 7ed1a39a..a218ae3c 100644
--- a/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md
+++ b/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md
@@ -1,11 +1,31 @@
# EnvironmentAndResources
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**environment** | [**Environment**](Environment.md) | | [optional]
-**frontends** | [**Frontends**](Frontends.md) | | [optional]
-**shares** | [**Shares**](Shares.md) | | [optional]
+**frontends** | [**List[Frontend]**](Frontend.md) | | [optional]
+**shares** | [**List[Share]**](Share.md) | | [optional]
+## Example
+
+```python
+from zrok_api.models.environment_and_resources import EnvironmentAndResources
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of EnvironmentAndResources from a JSON string
+environment_and_resources_instance = EnvironmentAndResources.from_json(json)
+# print the JSON string representation of the object
+print(EnvironmentAndResources.to_json())
+
+# convert the object into a dict
+environment_and_resources_dict = environment_and_resources_instance.to_dict()
+# create an instance of EnvironmentAndResources from a dict
+environment_and_resources_from_dict = EnvironmentAndResources.from_dict(environment_and_resources_dict)
+```
[[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
index f9e49447..b55009de 100644
--- a/sdk/python/sdk/zrok/docs/EnvironmentApi.md
+++ b/sdk/python/sdk/zrok/docs/EnvironmentApi.md
@@ -7,40 +7,59 @@ Method | HTTP request | Description
[**disable**](EnvironmentApi.md#disable) | **POST** /disable |
[**enable**](EnvironmentApi.md#enable) | **POST** /enable |
+
# **disable**
> disable(body=body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.disable_request import DisableRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.EnvironmentApi(zrok_api.ApiClient(configuration))
-body = zrok_api.DisableBody() # DisableBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.EnvironmentApi(api_client)
+ body = zrok_api.DisableRequest() # DisableRequest | (optional)
-try:
- api_instance.disable(body=body)
-except ApiException as e:
- print("Exception when calling EnvironmentApi->disable: %s\n" % e)
+ try:
+ api_instance.disable(body=body)
+ except Exception as e:
+ print("Exception when calling EnvironmentApi->disable: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**DisableBody**](DisableBody.md)| | [optional]
+ **body** | [**DisableRequest**](DisableRequest.md)| | [optional]
### Return type
@@ -55,47 +74,75 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | environment disabled | - |
+**401** | invalid environment | - |
+**500** | internal server error | - |
+
[[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)
+> CreateIdentity201Response enable(body=body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.create_identity201_response import CreateIdentity201Response
+from zrok_api.models.enable_request import EnableRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.EnvironmentApi(zrok_api.ApiClient(configuration))
-body = zrok_api.EnableBody() # EnableBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.EnvironmentApi(api_client)
+ body = zrok_api.EnableRequest() # EnableRequest | (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)
+ try:
+ api_response = api_instance.enable(body=body)
+ print("The response of EnvironmentApi->enable:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling EnvironmentApi->enable: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**EnableBody**](EnableBody.md)| | [optional]
+ **body** | [**EnableRequest**](EnableRequest.md)| | [optional]
### Return type
-[**InlineResponse2011**](InlineResponse2011.md)
+[**CreateIdentity201Response**](CreateIdentity201Response.md)
### Authorization
@@ -106,5 +153,14 @@ Name | Type | Description | Notes
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | environment enabled | - |
+**401** | unauthorized | - |
+**404** | account not found | - |
+**500** | internal server error | - |
+
[[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/Frontend.md b/sdk/python/sdk/zrok/docs/Frontend.md
index 428eb19d..ce41a9b7 100644
--- a/sdk/python/sdk/zrok/docs/Frontend.md
+++ b/sdk/python/sdk/zrok/docs/Frontend.md
@@ -1,6 +1,8 @@
# Frontend
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
@@ -13,5 +15,23 @@ Name | Type | Description | Notes
**created_at** | **int** | | [optional]
**updated_at** | **int** | | [optional]
+## Example
+
+```python
+from zrok_api.models.frontend import Frontend
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Frontend from a JSON string
+frontend_instance = Frontend.from_json(json)
+# print the JSON string representation of the object
+print(Frontend.to_json())
+
+# convert the object into a dict
+frontend_dict = frontend_instance.to_dict()
+# create an instance of Frontend from a dict
+frontend_from_dict = Frontend.from_dict(frontend_dict)
+```
[[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/GetSparklines200Response.md b/sdk/python/sdk/zrok/docs/GetSparklines200Response.md
new file mode 100644
index 00000000..66528c7e
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/GetSparklines200Response.md
@@ -0,0 +1,29 @@
+# GetSparklines200Response
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sparklines** | [**List[Metrics]**](Metrics.md) | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.get_sparklines200_response import GetSparklines200Response
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GetSparklines200Response from a JSON string
+get_sparklines200_response_instance = GetSparklines200Response.from_json(json)
+# print the JSON string representation of the object
+print(GetSparklines200Response.to_json())
+
+# convert the object into a dict
+get_sparklines200_response_dict = get_sparklines200_response_instance.to_dict()
+# create an instance of GetSparklines200Response from a dict
+get_sparklines200_response_from_dict = GetSparklines200Response.from_dict(get_sparklines200_response_dict)
+```
+[[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/GetSparklinesRequest.md b/sdk/python/sdk/zrok/docs/GetSparklinesRequest.md
new file mode 100644
index 00000000..29369ebc
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/GetSparklinesRequest.md
@@ -0,0 +1,31 @@
+# GetSparklinesRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**account** | **bool** | | [optional]
+**environments** | **List[str]** | | [optional]
+**shares** | **List[str]** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.get_sparklines_request import GetSparklinesRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GetSparklinesRequest from a JSON string
+get_sparklines_request_instance = GetSparklinesRequest.from_json(json)
+# print the JSON string representation of the object
+print(GetSparklinesRequest.to_json())
+
+# convert the object into a dict
+get_sparklines_request_dict = get_sparklines_request_instance.to_dict()
+# create an instance of GetSparklinesRequest from a dict
+get_sparklines_request_from_dict = GetSparklinesRequest.from_dict(get_sparklines_request_dict)
+```
+[[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/InviteRequest.md b/sdk/python/sdk/zrok/docs/InviteRequest.md
new file mode 100644
index 00000000..039132e8
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/InviteRequest.md
@@ -0,0 +1,30 @@
+# InviteRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | | [optional]
+**invite_token** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.invite_request import InviteRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of InviteRequest from a JSON string
+invite_request_instance = InviteRequest.from_json(json)
+# print the JSON string representation of the object
+print(InviteRequest.to_json())
+
+# convert the object into a dict
+invite_request_dict = invite_request_instance.to_dict()
+# create an instance of InviteRequest from a dict
+invite_request_from_dict = InviteRequest.from_dict(invite_request_dict)
+```
+[[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/InviteTokenGenerateRequest.md b/sdk/python/sdk/zrok/docs/InviteTokenGenerateRequest.md
new file mode 100644
index 00000000..33a20d70
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/InviteTokenGenerateRequest.md
@@ -0,0 +1,29 @@
+# InviteTokenGenerateRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**invite_tokens** | **List[str]** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of InviteTokenGenerateRequest from a JSON string
+invite_token_generate_request_instance = InviteTokenGenerateRequest.from_json(json)
+# print the JSON string representation of the object
+print(InviteTokenGenerateRequest.to_json())
+
+# convert the object into a dict
+invite_token_generate_request_dict = invite_token_generate_request_instance.to_dict()
+# create an instance of InviteTokenGenerateRequest from a dict
+invite_token_generate_request_from_dict = InviteTokenGenerateRequest.from_dict(invite_token_generate_request_dict)
+```
+[[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/ListFrontends200ResponseInner.md b/sdk/python/sdk/zrok/docs/ListFrontends200ResponseInner.md
new file mode 100644
index 00000000..625ea343
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/ListFrontends200ResponseInner.md
@@ -0,0 +1,34 @@
+# ListFrontends200ResponseInner
+
+
+## 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]
+
+## Example
+
+```python
+from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ListFrontends200ResponseInner from a JSON string
+list_frontends200_response_inner_instance = ListFrontends200ResponseInner.from_json(json)
+# print the JSON string representation of the object
+print(ListFrontends200ResponseInner.to_json())
+
+# convert the object into a dict
+list_frontends200_response_inner_dict = list_frontends200_response_inner_instance.to_dict()
+# create an instance of ListFrontends200ResponseInner from a dict
+list_frontends200_response_inner_from_dict = ListFrontends200ResponseInner.from_dict(list_frontends200_response_inner_dict)
+```
+[[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/ListMemberships200Response.md b/sdk/python/sdk/zrok/docs/ListMemberships200Response.md
new file mode 100644
index 00000000..48e19dbf
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/ListMemberships200Response.md
@@ -0,0 +1,29 @@
+# ListMemberships200Response
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**memberships** | [**List[ListMemberships200ResponseMembershipsInner]**](ListMemberships200ResponseMembershipsInner.md) | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.list_memberships200_response import ListMemberships200Response
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ListMemberships200Response from a JSON string
+list_memberships200_response_instance = ListMemberships200Response.from_json(json)
+# print the JSON string representation of the object
+print(ListMemberships200Response.to_json())
+
+# convert the object into a dict
+list_memberships200_response_dict = list_memberships200_response_instance.to_dict()
+# create an instance of ListMemberships200Response from a dict
+list_memberships200_response_from_dict = ListMemberships200Response.from_dict(list_memberships200_response_dict)
+```
+[[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/ListMemberships200ResponseMembershipsInner.md b/sdk/python/sdk/zrok/docs/ListMemberships200ResponseMembershipsInner.md
new file mode 100644
index 00000000..e85c7440
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/ListMemberships200ResponseMembershipsInner.md
@@ -0,0 +1,31 @@
+# ListMemberships200ResponseMembershipsInner
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**organization_token** | **str** | | [optional]
+**description** | **str** | | [optional]
+**admin** | **bool** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ListMemberships200ResponseMembershipsInner from a JSON string
+list_memberships200_response_memberships_inner_instance = ListMemberships200ResponseMembershipsInner.from_json(json)
+# print the JSON string representation of the object
+print(ListMemberships200ResponseMembershipsInner.to_json())
+
+# convert the object into a dict
+list_memberships200_response_memberships_inner_dict = list_memberships200_response_memberships_inner_instance.to_dict()
+# create an instance of ListMemberships200ResponseMembershipsInner from a dict
+list_memberships200_response_memberships_inner_from_dict = ListMemberships200ResponseMembershipsInner.from_dict(list_memberships200_response_memberships_inner_dict)
+```
+[[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/ListOrganizationMembers200Response.md b/sdk/python/sdk/zrok/docs/ListOrganizationMembers200Response.md
new file mode 100644
index 00000000..e05a28bf
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/ListOrganizationMembers200Response.md
@@ -0,0 +1,29 @@
+# ListOrganizationMembers200Response
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**members** | [**List[ListOrganizationMembers200ResponseMembersInner]**](ListOrganizationMembers200ResponseMembersInner.md) | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ListOrganizationMembers200Response from a JSON string
+list_organization_members200_response_instance = ListOrganizationMembers200Response.from_json(json)
+# print the JSON string representation of the object
+print(ListOrganizationMembers200Response.to_json())
+
+# convert the object into a dict
+list_organization_members200_response_dict = list_organization_members200_response_instance.to_dict()
+# create an instance of ListOrganizationMembers200Response from a dict
+list_organization_members200_response_from_dict = ListOrganizationMembers200Response.from_dict(list_organization_members200_response_dict)
+```
+[[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/ListOrganizationMembers200ResponseMembersInner.md b/sdk/python/sdk/zrok/docs/ListOrganizationMembers200ResponseMembersInner.md
new file mode 100644
index 00000000..8ebbb35e
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/ListOrganizationMembers200ResponseMembersInner.md
@@ -0,0 +1,30 @@
+# ListOrganizationMembers200ResponseMembersInner
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | | [optional]
+**admin** | **bool** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ListOrganizationMembers200ResponseMembersInner from a JSON string
+list_organization_members200_response_members_inner_instance = ListOrganizationMembers200ResponseMembersInner.from_json(json)
+# print the JSON string representation of the object
+print(ListOrganizationMembers200ResponseMembersInner.to_json())
+
+# convert the object into a dict
+list_organization_members200_response_members_inner_dict = list_organization_members200_response_members_inner_instance.to_dict()
+# create an instance of ListOrganizationMembers200ResponseMembersInner from a dict
+list_organization_members200_response_members_inner_from_dict = ListOrganizationMembers200ResponseMembersInner.from_dict(list_organization_members200_response_members_inner_dict)
+```
+[[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/ListOrganizations200Response.md b/sdk/python/sdk/zrok/docs/ListOrganizations200Response.md
new file mode 100644
index 00000000..46fe4d60
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/ListOrganizations200Response.md
@@ -0,0 +1,29 @@
+# ListOrganizations200Response
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**organizations** | [**List[ListOrganizations200ResponseOrganizationsInner]**](ListOrganizations200ResponseOrganizationsInner.md) | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.list_organizations200_response import ListOrganizations200Response
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ListOrganizations200Response from a JSON string
+list_organizations200_response_instance = ListOrganizations200Response.from_json(json)
+# print the JSON string representation of the object
+print(ListOrganizations200Response.to_json())
+
+# convert the object into a dict
+list_organizations200_response_dict = list_organizations200_response_instance.to_dict()
+# create an instance of ListOrganizations200Response from a dict
+list_organizations200_response_from_dict = ListOrganizations200Response.from_dict(list_organizations200_response_dict)
+```
+[[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/ListOrganizations200ResponseOrganizationsInner.md b/sdk/python/sdk/zrok/docs/ListOrganizations200ResponseOrganizationsInner.md
new file mode 100644
index 00000000..468447f2
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/ListOrganizations200ResponseOrganizationsInner.md
@@ -0,0 +1,30 @@
+# ListOrganizations200ResponseOrganizationsInner
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**organization_token** | **str** | | [optional]
+**description** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ListOrganizations200ResponseOrganizationsInner from a JSON string
+list_organizations200_response_organizations_inner_instance = ListOrganizations200ResponseOrganizationsInner.from_json(json)
+# print the JSON string representation of the object
+print(ListOrganizations200ResponseOrganizationsInner.to_json())
+
+# convert the object into a dict
+list_organizations200_response_organizations_inner_dict = list_organizations200_response_organizations_inner_instance.to_dict()
+# create an instance of ListOrganizations200ResponseOrganizationsInner from a dict
+list_organizations200_response_organizations_inner_from_dict = ListOrganizations200ResponseOrganizationsInner.from_dict(list_organizations200_response_organizations_inner_dict)
+```
+[[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/LoginRequest.md b/sdk/python/sdk/zrok/docs/LoginRequest.md
new file mode 100644
index 00000000..05728618
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/LoginRequest.md
@@ -0,0 +1,30 @@
+# LoginRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | | [optional]
+**password** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.login_request import LoginRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of LoginRequest from a JSON string
+login_request_instance = LoginRequest.from_json(json)
+# print the JSON string representation of the object
+print(LoginRequest.to_json())
+
+# convert the object into a dict
+login_request_dict = login_request_instance.to_dict()
+# create an instance of LoginRequest from a dict
+login_request_from_dict = LoginRequest.from_dict(login_request_dict)
+```
+[[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
index 4d205435..22c06b51 100644
--- a/sdk/python/sdk/zrok/docs/MetadataApi.md
+++ b/sdk/python/sdk/zrok/docs/MetadataApi.md
@@ -21,34 +21,48 @@ Method | HTTP request | Description
[**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.models.client_version_check_request import ClientVersionCheckRequest
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)
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
-try:
- api_instance.client_version_check(body=body)
-except ApiException as e:
- print("Exception when calling MetadataApi->client_version_check: %s\n" % e)
+
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+ body = zrok_api.ClientVersionCheckRequest() # ClientVersionCheckRequest | (optional)
+
+ try:
+ api_instance.client_version_check(body=body)
+ except Exception as e:
+ print("Exception when calling MetadataApi->client_version_check: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**ClientVersionCheckBody**](ClientVersionCheckBody.md)| | [optional]
+ **body** | [**ClientVersionCheckRequest**](ClientVersionCheckRequest.md)| | [optional]
### Return type
@@ -63,6 +77,13 @@ No authorization required
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | compatible | - |
+**400** | not compatible | - |
+
[[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**
@@ -71,24 +92,38 @@ No authorization required
### Example
+
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.configuration import Configuration
from zrok_api.rest import ApiException
from pprint import pprint
-# create an instance of the API class
-api_instance = zrok_api.MetadataApi()
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
-try:
- api_response = api_instance.configuration()
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling MetadataApi->configuration: %s\n" % e)
+
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+
+ try:
+ api_response = api_instance.configuration()
+ print("The response of MetadataApi->configuration:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataApi->configuration: %s\n" % e)
```
+
+
### Parameters
+
This endpoint does not need any parameter.
### Return type
@@ -104,43 +139,68 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | current configuration | - |
+
[[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()
+> List[Environment] get_account_detail()
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.environment import Environment
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration))
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
-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)
+ try:
+ api_response = api_instance.get_account_detail()
+ print("The response of MetadataApi->get_account_detail:\n")
+ pprint(api_response)
+ except Exception 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)
+[**List[Environment]**](Environment.md)
### Authorization
@@ -151,6 +211,13 @@ This endpoint does not need any parameter.
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | ok | - |
+**500** | internal server error | - |
+
[[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**
@@ -159,32 +226,51 @@ This endpoint does not need any parameter.
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.metrics import Metrics
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration))
-duration = 'duration_example' # str | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+ 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)
+ try:
+ api_response = api_instance.get_account_metrics(duration=duration)
+ print("The response of MetadataApi->get_account_metrics:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**duration** | **str**| | [optional]
@@ -202,6 +288,14 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | account metrics | - |
+**400** | bad request | - |
+**500** | internal server error | - |
+
[[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**
@@ -210,32 +304,51 @@ Name | Type | Description | Notes
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.environment_and_resources import EnvironmentAndResources
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration))
-env_zid = 'env_zid_example' # str |
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+ 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)
+ try:
+ api_response = api_instance.get_environment_detail(env_zid)
+ print("The response of MetadataApi->get_environment_detail:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**env_zid** | **str**| |
@@ -253,6 +366,15 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | ok | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -261,33 +383,52 @@ Name | Type | Description | Notes
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.metrics import Metrics
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = '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)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+ 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)
+ try:
+ api_response = api_instance.get_environment_metrics(env_id, duration=duration)
+ print("The response of MetadataApi->get_environment_metrics:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**env_id** | **str**| |
@@ -306,6 +447,15 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | environment metrics | - |
+**400** | bad request | - |
+**401** | unauthorized | - |
+**500** | internal server error | - |
+
[[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**
@@ -314,32 +464,51 @@ Name | Type | Description | Notes
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.frontend import Frontend
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration))
-frontend_id = 56 # int |
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+ 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)
+ try:
+ api_response = api_instance.get_frontend_detail(frontend_id)
+ print("The response of MetadataApi->get_frontend_detail:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**frontend_id** | **int**| |
@@ -357,6 +526,15 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | ok | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -365,32 +543,51 @@ Name | Type | Description | Notes
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.share import Share
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration))
-share_token = 'share_token_example' # str |
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+ 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)
+ try:
+ api_response = api_instance.get_share_detail(share_token)
+ print("The response of MetadataApi->get_share_detail:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataApi->get_share_detail: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**share_token** | **str**| |
@@ -408,6 +605,15 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | ok | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -416,33 +622,52 @@ Name | Type | Description | Notes
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.metrics import Metrics
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = '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)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+ 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)
+ try:
+ api_response = api_instance.get_share_metrics(share_token, duration=duration)
+ print("The response of MetadataApi->get_share_metrics:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**share_token** | **str**| |
@@ -461,47 +686,76 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | share metrics | - |
+**400** | bad request | - |
+**401** | unauthorized | - |
+**500** | internal server error | - |
+
[[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)
+> GetSparklines200Response get_sparklines(body=body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.get_sparklines200_response import GetSparklines200Response
+from zrok_api.models.get_sparklines_request import GetSparklinesRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration))
-body = zrok_api.SparklinesBody() # SparklinesBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+ body = zrok_api.GetSparklinesRequest() # GetSparklinesRequest | (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)
+ try:
+ api_response = api_instance.get_sparklines(body=body)
+ print("The response of MetadataApi->get_sparklines:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataApi->get_sparklines: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**SparklinesBody**](SparklinesBody.md)| | [optional]
+ **body** | [**GetSparklinesRequest**](GetSparklinesRequest.md)| | [optional]
### Return type
-[**InlineResponse2006**](InlineResponse2006.md)
+[**GetSparklines200Response**](GetSparklines200Response.md)
### Authorization
@@ -512,43 +766,70 @@ Name | Type | Description | Notes
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | sparklines data | - |
+**401** | unauthorized | - |
+**500** | internal server error | - |
+
[[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()
+> ListMemberships200Response list_memberships()
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.list_memberships200_response import ListMemberships200Response
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration))
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
-try:
- api_response = api_instance.list_memberships()
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling MetadataApi->list_memberships: %s\n" % e)
+ try:
+ api_response = api_instance.list_memberships()
+ print("The response of MetadataApi->list_memberships:\n")
+ pprint(api_response)
+ except Exception 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)
+[**ListMemberships200Response**](ListMemberships200Response.md)
### Authorization
@@ -559,47 +840,73 @@ This endpoint does not need any parameter.
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | ok | - |
+**500** | internal server error | - |
+
[[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)
+> ListOrganizationMembers200Response list_org_members(organization_token)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration))
-organization_token = 'organization_token_example' # str |
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+ 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)
+ try:
+ api_response = api_instance.list_org_members(organization_token)
+ print("The response of MetadataApi->list_org_members:\n")
+ pprint(api_response)
+ except Exception 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)
+[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md)
### Authorization
@@ -610,6 +917,14 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | ok | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -618,33 +933,52 @@ Name | Type | Description | Notes
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.overview import Overview
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = '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 |
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+ 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)
+ try:
+ api_response = api_instance.org_account_overview(organization_token, account_email)
+ print("The response of MetadataApi->org_account_overview:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataApi->org_account_overview: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**organization_token** | **str**| |
@@ -663,6 +997,14 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | ok | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -671,30 +1013,49 @@ Name | Type | Description | Notes
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.overview import Overview
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration))
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
-try:
- api_response = api_instance.overview()
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling MetadataApi->overview: %s\n" % e)
+ try:
+ api_response = api_instance.overview()
+ print("The response of MetadataApi->overview:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataApi->overview: %s\n" % e)
```
+
+
### Parameters
+
This endpoint does not need any parameter.
### Return type
@@ -710,37 +1071,57 @@ This endpoint does not need any parameter.
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | overview returned | - |
+**500** | internal server error | - |
+
[[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()
+> str 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()
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
-try:
- api_response = api_instance.version()
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling MetadataApi->version: %s\n" % e)
+
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+
+ try:
+ api_response = api_instance.version()
+ print("The response of MetadataApi->version:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MetadataApi->version: %s\n" % e)
```
+
+
### Parameters
+
This endpoint does not need any parameter.
### Return type
-[**Version**](Version.md)
+**str**
### Authorization
@@ -751,37 +1132,57 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | legacy upgrade required | - |
+
[[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()
+> VersionInventory200Response version_inventory()
### Example
+
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.version_inventory200_response import VersionInventory200Response
from zrok_api.rest import ApiException
from pprint import pprint
-# create an instance of the API class
-api_instance = zrok_api.MetadataApi()
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
-try:
- api_response = api_instance.version_inventory()
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling MetadataApi->version_inventory: %s\n" % e)
+
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.MetadataApi(api_client)
+
+ try:
+ api_response = api_instance.version_inventory()
+ print("The response of MetadataApi->version_inventory:\n")
+ pprint(api_response)
+ except Exception 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)
+[**VersionInventory200Response**](VersionInventory200Response.md)
### Authorization
@@ -792,5 +1193,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | ok | - |
+
[[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
index 0be4994b..9216f700 100644
--- a/sdk/python/sdk/zrok/docs/Metrics.md
+++ b/sdk/python/sdk/zrok/docs/Metrics.md
@@ -1,12 +1,32 @@
# Metrics
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**scope** | **str** | | [optional]
**id** | **str** | | [optional]
**period** | **float** | | [optional]
-**samples** | [**list[MetricsSample]**](MetricsSample.md) | | [optional]
+**samples** | [**List[MetricsSample]**](MetricsSample.md) | | [optional]
+## Example
+
+```python
+from zrok_api.models.metrics import Metrics
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Metrics from a JSON string
+metrics_instance = Metrics.from_json(json)
+# print the JSON string representation of the object
+print(Metrics.to_json())
+
+# convert the object into a dict
+metrics_dict = metrics_instance.to_dict()
+# create an instance of Metrics from a dict
+metrics_from_dict = Metrics.from_dict(metrics_dict)
+```
[[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
index 60863b05..96c1d94e 100644
--- a/sdk/python/sdk/zrok/docs/MetricsSample.md
+++ b/sdk/python/sdk/zrok/docs/MetricsSample.md
@@ -1,11 +1,31 @@
# MetricsSample
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**rx** | **float** | | [optional]
**tx** | **float** | | [optional]
**timestamp** | **float** | | [optional]
+## Example
+
+```python
+from zrok_api.models.metrics_sample import MetricsSample
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of MetricsSample from a JSON string
+metrics_sample_instance = MetricsSample.from_json(json)
+# print the JSON string representation of the object
+print(MetricsSample.to_json())
+
+# convert the object into a dict
+metrics_sample_dict = metrics_sample_instance.to_dict()
+# create an instance of MetricsSample from a dict
+metrics_sample_from_dict = MetricsSample.from_dict(metrics_sample_dict)
+```
[[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
index 4d477740..f50d6232 100644
--- a/sdk/python/sdk/zrok/docs/Overview.md
+++ b/sdk/python/sdk/zrok/docs/Overview.md
@@ -1,10 +1,30 @@
# Overview
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**account_limited** | **bool** | | [optional]
-**environments** | [**list[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional]
+**environments** | [**List[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional]
+## Example
+
+```python
+from zrok_api.models.overview import Overview
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Overview from a JSON string
+overview_instance = Overview.from_json(json)
+# print the JSON string representation of the object
+print(Overview.to_json())
+
+# convert the object into a dict
+overview_dict = overview_instance.to_dict()
+# create an instance of Overview from a dict
+overview_from_dict = Overview.from_dict(overview_dict)
+```
[[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
index c45a677a..0a6d399c 100644
--- a/sdk/python/sdk/zrok/docs/Principal.md
+++ b/sdk/python/sdk/zrok/docs/Principal.md
@@ -1,6 +1,8 @@
# Principal
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
@@ -9,5 +11,23 @@ Name | Type | Description | Notes
**limitless** | **bool** | | [optional]
**admin** | **bool** | | [optional]
+## Example
+
+```python
+from zrok_api.models.principal import Principal
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Principal from a JSON string
+principal_instance = Principal.from_json(json)
+# print the JSON string representation of the object
+print(Principal.to_json())
+
+# convert the object into a dict
+principal_dict = principal_instance.to_dict()
+# create an instance of Principal from a dict
+principal_from_dict = Principal.from_dict(principal_dict)
+```
[[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/RegenerateAccountToken200Response.md b/sdk/python/sdk/zrok/docs/RegenerateAccountToken200Response.md
new file mode 100644
index 00000000..e86cc294
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/RegenerateAccountToken200Response.md
@@ -0,0 +1,29 @@
+# RegenerateAccountToken200Response
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**account_token** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RegenerateAccountToken200Response from a JSON string
+regenerate_account_token200_response_instance = RegenerateAccountToken200Response.from_json(json)
+# print the JSON string representation of the object
+print(RegenerateAccountToken200Response.to_json())
+
+# convert the object into a dict
+regenerate_account_token200_response_dict = regenerate_account_token200_response_instance.to_dict()
+# create an instance of RegenerateAccountToken200Response from a dict
+regenerate_account_token200_response_from_dict = RegenerateAccountToken200Response.from_dict(regenerate_account_token200_response_dict)
+```
+[[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/RegenerateAccountTokenRequest.md b/sdk/python/sdk/zrok/docs/RegenerateAccountTokenRequest.md
new file mode 100644
index 00000000..113262a6
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/RegenerateAccountTokenRequest.md
@@ -0,0 +1,29 @@
+# RegenerateAccountTokenRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email_address** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RegenerateAccountTokenRequest from a JSON string
+regenerate_account_token_request_instance = RegenerateAccountTokenRequest.from_json(json)
+# print the JSON string representation of the object
+print(RegenerateAccountTokenRequest.to_json())
+
+# convert the object into a dict
+regenerate_account_token_request_dict = regenerate_account_token_request_instance.to_dict()
+# create an instance of RegenerateAccountTokenRequest from a dict
+regenerate_account_token_request_from_dict = RegenerateAccountTokenRequest.from_dict(regenerate_account_token_request_dict)
+```
+[[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/RegisterRequest.md b/sdk/python/sdk/zrok/docs/RegisterRequest.md
new file mode 100644
index 00000000..6e268aff
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/RegisterRequest.md
@@ -0,0 +1,30 @@
+# RegisterRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**register_token** | **str** | | [optional]
+**password** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.register_request import RegisterRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RegisterRequest from a JSON string
+register_request_instance = RegisterRequest.from_json(json)
+# print the JSON string representation of the object
+print(RegisterRequest.to_json())
+
+# convert the object into a dict
+register_request_dict = register_request_instance.to_dict()
+# create an instance of RegisterRequest from a dict
+register_request_from_dict = RegisterRequest.from_dict(register_request_dict)
+```
+[[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/RemoveOrganizationMemberRequest.md b/sdk/python/sdk/zrok/docs/RemoveOrganizationMemberRequest.md
new file mode 100644
index 00000000..75743291
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/RemoveOrganizationMemberRequest.md
@@ -0,0 +1,30 @@
+# RemoveOrganizationMemberRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**organization_token** | **str** | | [optional]
+**email** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RemoveOrganizationMemberRequest from a JSON string
+remove_organization_member_request_instance = RemoveOrganizationMemberRequest.from_json(json)
+# print the JSON string representation of the object
+print(RemoveOrganizationMemberRequest.to_json())
+
+# convert the object into a dict
+remove_organization_member_request_dict = remove_organization_member_request_instance.to_dict()
+# create an instance of RemoveOrganizationMemberRequest from a dict
+remove_organization_member_request_from_dict = RemoveOrganizationMemberRequest.from_dict(remove_organization_member_request_dict)
+```
+[[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/ResetPasswordRequest.md b/sdk/python/sdk/zrok/docs/ResetPasswordRequest.md
new file mode 100644
index 00000000..e91e841a
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/ResetPasswordRequest.md
@@ -0,0 +1,30 @@
+# ResetPasswordRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**reset_token** | **str** | | [optional]
+**password** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.reset_password_request import ResetPasswordRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResetPasswordRequest from a JSON string
+reset_password_request_instance = ResetPasswordRequest.from_json(json)
+# print the JSON string representation of the object
+print(ResetPasswordRequest.to_json())
+
+# convert the object into a dict
+reset_password_request_dict = reset_password_request_instance.to_dict()
+# create an instance of ResetPasswordRequest from a dict
+reset_password_request_from_dict = ResetPasswordRequest.from_dict(reset_password_request_dict)
+```
+[[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
index 8a5d67ab..4fbfc430 100644
--- a/sdk/python/sdk/zrok/docs/Share.md
+++ b/sdk/python/sdk/zrok/docs/Share.md
@@ -1,6 +1,8 @@
# Share
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**share_token** | **str** | | [optional]
@@ -11,10 +13,28 @@ Name | Type | Description | Notes
**frontend_endpoint** | **str** | | [optional]
**backend_proxy_endpoint** | **str** | | [optional]
**reserved** | **bool** | | [optional]
-**activity** | [**SparkData**](SparkData.md) | | [optional]
+**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional]
**limited** | **bool** | | [optional]
**created_at** | **int** | | [optional]
**updated_at** | **int** | | [optional]
+## Example
+
+```python
+from zrok_api.models.share import Share
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Share from a JSON string
+share_instance = Share.from_json(json)
+# print the JSON string representation of the object
+print(Share.to_json())
+
+# convert the object into a dict
+share_dict = share_instance.to_dict()
+# create an instance of Share from a dict
+share_from_dict = Share.from_dict(share_dict)
+```
[[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
index 86a8b390..244b6f11 100644
--- a/sdk/python/sdk/zrok/docs/ShareApi.md
+++ b/sdk/python/sdk/zrok/docs/ShareApi.md
@@ -11,45 +11,66 @@ Method | HTTP request | Description
[**update_access**](ShareApi.md#update_access) | **PATCH** /access |
[**update_share**](ShareApi.md#update_share) | **PATCH** /share |
+
# **access**
-> InlineResponse2013 access(body=body)
+> Access201Response access(body=body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.access201_response import Access201Response
+from zrok_api.models.access_request import AccessRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration))
-body = zrok_api.AccessBody() # AccessBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.ShareApi(api_client)
+ body = zrok_api.AccessRequest() # AccessRequest | (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)
+ try:
+ api_response = api_instance.access(body=body)
+ print("The response of ShareApi->access:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ShareApi->access: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**AccessBody**](AccessBody.md)| | [optional]
+ **body** | [**AccessRequest**](AccessRequest.md)| | [optional]
### Return type
-[**InlineResponse2013**](InlineResponse2013.md)
+[**Access201Response**](Access201Response.md)
### Authorization
@@ -60,6 +81,15 @@ Name | Type | Description | Notes
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | access created | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -68,32 +98,52 @@ Name | Type | Description | Notes
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.share_request import ShareRequest
+from zrok_api.models.share_response import ShareResponse
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration))
-body = zrok_api.ShareRequest() # ShareRequest | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.ShareApi(api_client)
+ 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)
+ try:
+ api_response = api_instance.share(body=body)
+ print("The response of ShareApi->share:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ShareApi->share: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**ShareRequest**](ShareRequest.md)| | [optional]
@@ -111,6 +161,17 @@ Name | Type | Description | Notes
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**201** | share created | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**409** | conflict | - |
+**422** | unprocessable | - |
+**500** | internal server error | - |
+
[[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**
@@ -119,34 +180,52 @@ Name | Type | Description | Notes
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.unaccess_request import UnaccessRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration))
-body = zrok_api.UnaccessBody() # UnaccessBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.ShareApi(api_client)
+ body = zrok_api.UnaccessRequest() # UnaccessRequest | (optional)
-try:
- api_instance.unaccess(body=body)
-except ApiException as e:
- print("Exception when calling ShareApi->unaccess: %s\n" % e)
+ try:
+ api_instance.unaccess(body=body)
+ except Exception as e:
+ print("Exception when calling ShareApi->unaccess: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**UnaccessBody**](UnaccessBody.md)| | [optional]
+ **body** | [**UnaccessRequest**](UnaccessRequest.md)| | [optional]
### Return type
@@ -161,6 +240,15 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | access removed | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -169,34 +257,52 @@ void (empty response body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.unshare_request import UnshareRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration))
-body = zrok_api.UnshareBody() # UnshareBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.ShareApi(api_client)
+ body = zrok_api.UnshareRequest() # UnshareRequest | (optional)
-try:
- api_instance.unshare(body=body)
-except ApiException as e:
- print("Exception when calling ShareApi->unshare: %s\n" % e)
+ try:
+ api_instance.unshare(body=body)
+ except Exception as e:
+ print("Exception when calling ShareApi->unshare: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**UnshareBody**](UnshareBody.md)| | [optional]
+ **body** | [**UnshareRequest**](UnshareRequest.md)| | [optional]
### Return type
@@ -211,6 +317,15 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | share removed | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -219,34 +334,52 @@ void (empty response body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.update_access_request import UpdateAccessRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration))
-body = zrok_api.AccessBody1() # AccessBody1 | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.ShareApi(api_client)
+ body = zrok_api.UpdateAccessRequest() # UpdateAccessRequest | (optional)
-try:
- api_instance.update_access(body=body)
-except ApiException as e:
- print("Exception when calling ShareApi->update_access: %s\n" % e)
+ try:
+ api_instance.update_access(body=body)
+ except Exception as e:
+ print("Exception when calling ShareApi->update_access: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**AccessBody1**](AccessBody1.md)| | [optional]
+ **body** | [**UpdateAccessRequest**](UpdateAccessRequest.md)| | [optional]
### Return type
@@ -261,6 +394,15 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | access updated | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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**
@@ -269,34 +411,52 @@ void (empty response body)
### Example
+
+* Api Key Authentication (key):
+
```python
-from __future__ import print_function
-import time
import zrok_api
+from zrok_api.models.update_share_request import UpdateShareRequest
from zrok_api.rest import ApiException
from pprint import pprint
+# Defining the host is optional and defaults to /api/v1
+# See configuration.py for a list of all supported configuration parameters.
+configuration = zrok_api.Configuration(
+ host = "/api/v1"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
# Configure API key authorization: key
-configuration = zrok_api.Configuration()
-configuration.api_key['x-token'] = 'YOUR_API_KEY'
+configuration.api_key['key'] = os.environ["API_KEY"]
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['x-token'] = 'Bearer'
+# configuration.api_key_prefix['key'] = 'Bearer'
-# create an instance of the API class
-api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration))
-body = zrok_api.ShareBody() # ShareBody | (optional)
+# Enter a context with an instance of the API client
+with zrok_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = zrok_api.ShareApi(api_client)
+ body = zrok_api.UpdateShareRequest() # UpdateShareRequest | (optional)
-try:
- api_instance.update_share(body=body)
-except ApiException as e:
- print("Exception when calling ShareApi->update_share: %s\n" % e)
+ try:
+ api_instance.update_share(body=body)
+ except Exception as e:
+ print("Exception when calling ShareApi->update_share: %s\n" % e)
```
+
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**ShareBody**](ShareBody.md)| | [optional]
+ **body** | [**UpdateShareRequest**](UpdateShareRequest.md)| | [optional]
### Return type
@@ -311,5 +471,15 @@ void (empty response body)
- **Content-Type**: application/zrok.v1+json
- **Accept**: Not defined
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | share updated | - |
+**400** | bad request | - |
+**401** | unauthorized | - |
+**404** | not found | - |
+**500** | internal server error | - |
+
[[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/ShareRequest.md b/sdk/python/sdk/zrok/docs/ShareRequest.md
index d1054fc7..eb92f07a 100644
--- a/sdk/python/sdk/zrok/docs/ShareRequest.md
+++ b/sdk/python/sdk/zrok/docs/ShareRequest.md
@@ -1,22 +1,42 @@
# ShareRequest
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**env_zid** | **str** | | [optional]
**share_mode** | **str** | | [optional]
-**frontend_selection** | **list[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]
+**auth_users** | [**List[AuthUser]**](AuthUser.md) | | [optional]
**oauth_provider** | **str** | | [optional]
-**oauth_email_domains** | **list[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]
+**access_grants** | **List[str]** | | [optional]
**unique_name** | **str** | | [optional]
+## Example
+
+```python
+from zrok_api.models.share_request import ShareRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ShareRequest from a JSON string
+share_request_instance = ShareRequest.from_json(json)
+# print the JSON string representation of the object
+print(ShareRequest.to_json())
+
+# convert the object into a dict
+share_request_dict = share_request_instance.to_dict()
+# create an instance of ShareRequest from a dict
+share_request_from_dict = ShareRequest.from_dict(share_request_dict)
+```
[[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
index f6d09e89..9bbedd0c 100644
--- a/sdk/python/sdk/zrok/docs/ShareResponse.md
+++ b/sdk/python/sdk/zrok/docs/ShareResponse.md
@@ -1,10 +1,30 @@
# ShareResponse
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**frontend_proxy_endpoints** | **list[str]** | | [optional]
+**frontend_proxy_endpoints** | **List[str]** | | [optional]
**share_token** | **str** | | [optional]
+## Example
+
+```python
+from zrok_api.models.share_response import ShareResponse
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ShareResponse from a JSON string
+share_response_instance = ShareResponse.from_json(json)
+# print the JSON string representation of the object
+print(ShareResponse.to_json())
+
+# convert the object into a dict
+share_response_dict = share_response_instance.to_dict()
+# create an instance of ShareResponse from a dict
+share_response_from_dict = ShareResponse.from_dict(share_response_dict)
+```
[[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
index 192675b6..6479404c 100644
--- a/sdk/python/sdk/zrok/docs/SparkDataSample.md
+++ b/sdk/python/sdk/zrok/docs/SparkDataSample.md
@@ -1,10 +1,30 @@
# SparkDataSample
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**rx** | **float** | | [optional]
**tx** | **float** | | [optional]
+## Example
+
+```python
+from zrok_api.models.spark_data_sample import SparkDataSample
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of SparkDataSample from a JSON string
+spark_data_sample_instance = SparkDataSample.from_json(json)
+# print the JSON string representation of the object
+print(SparkDataSample.to_json())
+
+# convert the object into a dict
+spark_data_sample_dict = spark_data_sample_instance.to_dict()
+# create an instance of SparkDataSample from a dict
+spark_data_sample_from_dict = SparkDataSample.from_dict(spark_data_sample_dict)
+```
[[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/UnaccessRequest.md b/sdk/python/sdk/zrok/docs/UnaccessRequest.md
new file mode 100644
index 00000000..c7d57fd8
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/UnaccessRequest.md
@@ -0,0 +1,31 @@
+# UnaccessRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**frontend_token** | **str** | | [optional]
+**env_zid** | **str** | | [optional]
+**share_token** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.unaccess_request import UnaccessRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UnaccessRequest from a JSON string
+unaccess_request_instance = UnaccessRequest.from_json(json)
+# print the JSON string representation of the object
+print(UnaccessRequest.to_json())
+
+# convert the object into a dict
+unaccess_request_dict = unaccess_request_instance.to_dict()
+# create an instance of UnaccessRequest from a dict
+unaccess_request_from_dict = UnaccessRequest.from_dict(unaccess_request_dict)
+```
+[[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/UnshareRequest.md b/sdk/python/sdk/zrok/docs/UnshareRequest.md
new file mode 100644
index 00000000..d376f008
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/UnshareRequest.md
@@ -0,0 +1,31 @@
+# UnshareRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**env_zid** | **str** | | [optional]
+**share_token** | **str** | | [optional]
+**reserved** | **bool** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.unshare_request import UnshareRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UnshareRequest from a JSON string
+unshare_request_instance = UnshareRequest.from_json(json)
+# print the JSON string representation of the object
+print(UnshareRequest.to_json())
+
+# convert the object into a dict
+unshare_request_dict = unshare_request_instance.to_dict()
+# create an instance of UnshareRequest from a dict
+unshare_request_from_dict = UnshareRequest.from_dict(unshare_request_dict)
+```
+[[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/UpdateAccessRequest.md b/sdk/python/sdk/zrok/docs/UpdateAccessRequest.md
new file mode 100644
index 00000000..7d9027da
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/UpdateAccessRequest.md
@@ -0,0 +1,31 @@
+# UpdateAccessRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**frontend_token** | **str** | | [optional]
+**bind_address** | **str** | | [optional]
+**description** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.update_access_request import UpdateAccessRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateAccessRequest from a JSON string
+update_access_request_instance = UpdateAccessRequest.from_json(json)
+# print the JSON string representation of the object
+print(UpdateAccessRequest.to_json())
+
+# convert the object into a dict
+update_access_request_dict = update_access_request_instance.to_dict()
+# create an instance of UpdateAccessRequest from a dict
+update_access_request_from_dict = UpdateAccessRequest.from_dict(update_access_request_dict)
+```
+[[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/UpdateFrontendRequest.md b/sdk/python/sdk/zrok/docs/UpdateFrontendRequest.md
new file mode 100644
index 00000000..754bf4b6
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/UpdateFrontendRequest.md
@@ -0,0 +1,31 @@
+# UpdateFrontendRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**frontend_token** | **str** | | [optional]
+**public_name** | **str** | | [optional]
+**url_template** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.update_frontend_request import UpdateFrontendRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateFrontendRequest from a JSON string
+update_frontend_request_instance = UpdateFrontendRequest.from_json(json)
+# print the JSON string representation of the object
+print(UpdateFrontendRequest.to_json())
+
+# convert the object into a dict
+update_frontend_request_dict = update_frontend_request_instance.to_dict()
+# create an instance of UpdateFrontendRequest from a dict
+update_frontend_request_from_dict = UpdateFrontendRequest.from_dict(update_frontend_request_dict)
+```
+[[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/UpdateShareRequest.md b/sdk/python/sdk/zrok/docs/UpdateShareRequest.md
new file mode 100644
index 00000000..8719ab10
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/UpdateShareRequest.md
@@ -0,0 +1,32 @@
+# UpdateShareRequest
+
+
+## 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]
+
+## Example
+
+```python
+from zrok_api.models.update_share_request import UpdateShareRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateShareRequest from a JSON string
+update_share_request_instance = UpdateShareRequest.from_json(json)
+# print the JSON string representation of the object
+print(UpdateShareRequest.to_json())
+
+# convert the object into a dict
+update_share_request_dict = update_share_request_instance.to_dict()
+# create an instance of UpdateShareRequest from a dict
+update_share_request_from_dict = UpdateShareRequest.from_dict(update_share_request_dict)
+```
+[[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/Verify200Response.md b/sdk/python/sdk/zrok/docs/Verify200Response.md
new file mode 100644
index 00000000..5ca1769d
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/Verify200Response.md
@@ -0,0 +1,29 @@
+# Verify200Response
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.verify200_response import Verify200Response
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Verify200Response from a JSON string
+verify200_response_instance = Verify200Response.from_json(json)
+# print the JSON string representation of the object
+print(Verify200Response.to_json())
+
+# convert the object into a dict
+verify200_response_dict = verify200_response_instance.to_dict()
+# create an instance of Verify200Response from a dict
+verify200_response_from_dict = Verify200Response.from_dict(verify200_response_dict)
+```
+[[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/VerifyRequest.md b/sdk/python/sdk/zrok/docs/VerifyRequest.md
new file mode 100644
index 00000000..da6a0728
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/VerifyRequest.md
@@ -0,0 +1,29 @@
+# VerifyRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**register_token** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.verify_request import VerifyRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of VerifyRequest from a JSON string
+verify_request_instance = VerifyRequest.from_json(json)
+# print the JSON string representation of the object
+print(VerifyRequest.to_json())
+
+# convert the object into a dict
+verify_request_dict = verify_request_instance.to_dict()
+# create an instance of VerifyRequest from a dict
+verify_request_from_dict = VerifyRequest.from_dict(verify_request_dict)
+```
+[[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/VersionInventory200Response.md b/sdk/python/sdk/zrok/docs/VersionInventory200Response.md
new file mode 100644
index 00000000..2c08de2c
--- /dev/null
+++ b/sdk/python/sdk/zrok/docs/VersionInventory200Response.md
@@ -0,0 +1,29 @@
+# VersionInventory200Response
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**controller_version** | **str** | | [optional]
+
+## Example
+
+```python
+from zrok_api.models.version_inventory200_response import VersionInventory200Response
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of VersionInventory200Response from a JSON string
+version_inventory200_response_instance = VersionInventory200Response.from_json(json)
+# print the JSON string representation of the object
+print(VersionInventory200Response.to_json())
+
+# convert the object into a dict
+version_inventory200_response_dict = version_inventory200_response_instance.to_dict()
+# create an instance of VersionInventory200Response from a dict
+version_inventory200_response_from_dict = VersionInventory200Response.from_dict(version_inventory200_response_dict)
+```
+[[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
index bafdc075..cc85509e 100644
--- a/sdk/python/sdk/zrok/requirements.txt
+++ b/sdk/python/sdk/zrok/requirements.txt
@@ -1,5 +1,5 @@
-certifi >= 14.05.14
-six >= 1.10
python_dateutil >= 2.5.3
setuptools >= 21.0.0
-urllib3 >= 1.15.1
+urllib3 >= 1.25.3, < 2.1.0
+pydantic >= 2
+typing-extensions >= 4.7.1
diff --git a/sdk/python/sdk/zrok/test/__init__.py b/sdk/python/sdk/zrok/test/__init__.py
index 576f56f8..e69de29b 100644
--- a/sdk/python/sdk/zrok/test/__init__.py
+++ b/sdk/python/sdk/zrok/test/__init__.py
@@ -1 +0,0 @@
-# coding: utf-8
\ No newline at end of file
diff --git a/sdk/python/sdk/zrok/test/test_access201_response.py b/sdk/python/sdk/zrok/test/test_access201_response.py
new file mode 100644
index 00000000..9b698d1c
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_access201_response.py
@@ -0,0 +1,52 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.access201_response import Access201Response
+
+class TestAccess201Response(unittest.TestCase):
+ """Access201Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> Access201Response:
+ """Test Access201Response
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `Access201Response`
+ """
+ model = Access201Response()
+ if include_optional:
+ return Access201Response(
+ frontend_token = '',
+ backend_mode = ''
+ )
+ else:
+ return Access201Response(
+ )
+ """
+
+ def testAccess201Response(self):
+ """Test Access201Response"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_access_request.py b/sdk/python/sdk/zrok/test/test_access_request.py
new file mode 100644
index 00000000..070903e9
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_access_request.py
@@ -0,0 +1,54 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.access_request import AccessRequest
+
+class TestAccessRequest(unittest.TestCase):
+ """AccessRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> AccessRequest:
+ """Test AccessRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `AccessRequest`
+ """
+ model = AccessRequest()
+ if include_optional:
+ return AccessRequest(
+ env_zid = '',
+ share_token = '',
+ bind_address = '',
+ description = ''
+ )
+ else:
+ return AccessRequest(
+ )
+ """
+
+ def testAccessRequest(self):
+ """Test AccessRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_add_organization_member_request.py b/sdk/python/sdk/zrok/test/test_add_organization_member_request.py
new file mode 100644
index 00000000..7a08de67
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_add_organization_member_request.py
@@ -0,0 +1,53 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest
+
+class TestAddOrganizationMemberRequest(unittest.TestCase):
+ """AddOrganizationMemberRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> AddOrganizationMemberRequest:
+ """Test AddOrganizationMemberRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `AddOrganizationMemberRequest`
+ """
+ model = AddOrganizationMemberRequest()
+ if include_optional:
+ return AddOrganizationMemberRequest(
+ organization_token = '',
+ email = '',
+ admin = True
+ )
+ else:
+ return AddOrganizationMemberRequest(
+ )
+ """
+
+ def testAddOrganizationMemberRequest(self):
+ """Test AddOrganizationMemberRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_change_password_request.py b/sdk/python/sdk/zrok/test/test_change_password_request.py
new file mode 100644
index 00000000..592e8be1
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_change_password_request.py
@@ -0,0 +1,53 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.change_password_request import ChangePasswordRequest
+
+class TestChangePasswordRequest(unittest.TestCase):
+ """ChangePasswordRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ChangePasswordRequest:
+ """Test ChangePasswordRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ChangePasswordRequest`
+ """
+ model = ChangePasswordRequest()
+ if include_optional:
+ return ChangePasswordRequest(
+ email = '',
+ old_password = '',
+ new_password = ''
+ )
+ else:
+ return ChangePasswordRequest(
+ )
+ """
+
+ def testChangePasswordRequest(self):
+ """Test ChangePasswordRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_client_version_check_request.py b/sdk/python/sdk/zrok/test/test_client_version_check_request.py
new file mode 100644
index 00000000..169017d6
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_client_version_check_request.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.client_version_check_request import ClientVersionCheckRequest
+
+class TestClientVersionCheckRequest(unittest.TestCase):
+ """ClientVersionCheckRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ClientVersionCheckRequest:
+ """Test ClientVersionCheckRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ClientVersionCheckRequest`
+ """
+ model = ClientVersionCheckRequest()
+ if include_optional:
+ return ClientVersionCheckRequest(
+ client_version = ''
+ )
+ else:
+ return ClientVersionCheckRequest(
+ )
+ """
+
+ def testClientVersionCheckRequest(self):
+ """Test ClientVersionCheckRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_create_frontend201_response.py b/sdk/python/sdk/zrok/test/test_create_frontend201_response.py
new file mode 100644
index 00000000..3f983a1a
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_create_frontend201_response.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.create_frontend201_response import CreateFrontend201Response
+
+class TestCreateFrontend201Response(unittest.TestCase):
+ """CreateFrontend201Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateFrontend201Response:
+ """Test CreateFrontend201Response
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `CreateFrontend201Response`
+ """
+ model = CreateFrontend201Response()
+ if include_optional:
+ return CreateFrontend201Response(
+ frontend_token = ''
+ )
+ else:
+ return CreateFrontend201Response(
+ )
+ """
+
+ def testCreateFrontend201Response(self):
+ """Test CreateFrontend201Response"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_create_frontend_request.py b/sdk/python/sdk/zrok/test/test_create_frontend_request.py
new file mode 100644
index 00000000..8fc35754
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_create_frontend_request.py
@@ -0,0 +1,54 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.create_frontend_request import CreateFrontendRequest
+
+class TestCreateFrontendRequest(unittest.TestCase):
+ """CreateFrontendRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateFrontendRequest:
+ """Test CreateFrontendRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `CreateFrontendRequest`
+ """
+ model = CreateFrontendRequest()
+ if include_optional:
+ return CreateFrontendRequest(
+ z_id = '',
+ url_template = '',
+ public_name = '',
+ permission_mode = 'open'
+ )
+ else:
+ return CreateFrontendRequest(
+ )
+ """
+
+ def testCreateFrontendRequest(self):
+ """Test CreateFrontendRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_create_identity201_response.py b/sdk/python/sdk/zrok/test/test_create_identity201_response.py
new file mode 100644
index 00000000..2a9c8f2b
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_create_identity201_response.py
@@ -0,0 +1,52 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.create_identity201_response import CreateIdentity201Response
+
+class TestCreateIdentity201Response(unittest.TestCase):
+ """CreateIdentity201Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateIdentity201Response:
+ """Test CreateIdentity201Response
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `CreateIdentity201Response`
+ """
+ model = CreateIdentity201Response()
+ if include_optional:
+ return CreateIdentity201Response(
+ identity = '',
+ cfg = ''
+ )
+ else:
+ return CreateIdentity201Response(
+ )
+ """
+
+ def testCreateIdentity201Response(self):
+ """Test CreateIdentity201Response"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_create_identity_request.py b/sdk/python/sdk/zrok/test/test_create_identity_request.py
new file mode 100644
index 00000000..9bf33031
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_create_identity_request.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.create_identity_request import CreateIdentityRequest
+
+class TestCreateIdentityRequest(unittest.TestCase):
+ """CreateIdentityRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateIdentityRequest:
+ """Test CreateIdentityRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `CreateIdentityRequest`
+ """
+ model = CreateIdentityRequest()
+ if include_optional:
+ return CreateIdentityRequest(
+ name = ''
+ )
+ else:
+ return CreateIdentityRequest(
+ )
+ """
+
+ def testCreateIdentityRequest(self):
+ """Test CreateIdentityRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_create_organization201_response.py b/sdk/python/sdk/zrok/test/test_create_organization201_response.py
new file mode 100644
index 00000000..d4dc7c81
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_create_organization201_response.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.create_organization201_response import CreateOrganization201Response
+
+class TestCreateOrganization201Response(unittest.TestCase):
+ """CreateOrganization201Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateOrganization201Response:
+ """Test CreateOrganization201Response
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `CreateOrganization201Response`
+ """
+ model = CreateOrganization201Response()
+ if include_optional:
+ return CreateOrganization201Response(
+ organization_token = ''
+ )
+ else:
+ return CreateOrganization201Response(
+ )
+ """
+
+ def testCreateOrganization201Response(self):
+ """Test CreateOrganization201Response"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_create_organization_request.py b/sdk/python/sdk/zrok/test/test_create_organization_request.py
new file mode 100644
index 00000000..da880237
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_create_organization_request.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.create_organization_request import CreateOrganizationRequest
+
+class TestCreateOrganizationRequest(unittest.TestCase):
+ """CreateOrganizationRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateOrganizationRequest:
+ """Test CreateOrganizationRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `CreateOrganizationRequest`
+ """
+ model = CreateOrganizationRequest()
+ if include_optional:
+ return CreateOrganizationRequest(
+ description = ''
+ )
+ else:
+ return CreateOrganizationRequest(
+ )
+ """
+
+ def testCreateOrganizationRequest(self):
+ """Test CreateOrganizationRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_disable_request.py b/sdk/python/sdk/zrok/test/test_disable_request.py
new file mode 100644
index 00000000..c4837b4b
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_disable_request.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.disable_request import DisableRequest
+
+class TestDisableRequest(unittest.TestCase):
+ """DisableRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> DisableRequest:
+ """Test DisableRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `DisableRequest`
+ """
+ model = DisableRequest()
+ if include_optional:
+ return DisableRequest(
+ identity = ''
+ )
+ else:
+ return DisableRequest(
+ )
+ """
+
+ def testDisableRequest(self):
+ """Test DisableRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_enable_request.py b/sdk/python/sdk/zrok/test/test_enable_request.py
new file mode 100644
index 00000000..49689df4
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_enable_request.py
@@ -0,0 +1,52 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.enable_request import EnableRequest
+
+class TestEnableRequest(unittest.TestCase):
+ """EnableRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> EnableRequest:
+ """Test EnableRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `EnableRequest`
+ """
+ model = EnableRequest()
+ if include_optional:
+ return EnableRequest(
+ description = '',
+ host = ''
+ )
+ else:
+ return EnableRequest(
+ )
+ """
+
+ def testEnableRequest(self):
+ """Test EnableRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+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
index cb96d34b..0a7a8e45 100644
--- a/sdk/python/sdk/zrok/test/test_frontends.py
+++ b/sdk/python/sdk/zrok/test/test_frontends.py
@@ -15,7 +15,7 @@ from __future__ import absolute_import
import unittest
import zrok_api
-from zrok_api.models.frontends import Frontends # noqa: E501
+from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner # noqa: E501
from zrok_api.rest import ApiException
diff --git a/sdk/python/sdk/zrok/test/test_get_sparklines200_response.py b/sdk/python/sdk/zrok/test/test_get_sparklines200_response.py
new file mode 100644
index 00000000..8367cc34
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_get_sparklines200_response.py
@@ -0,0 +1,62 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.get_sparklines200_response import GetSparklines200Response
+
+class TestGetSparklines200Response(unittest.TestCase):
+ """GetSparklines200Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GetSparklines200Response:
+ """Test GetSparklines200Response
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `GetSparklines200Response`
+ """
+ model = GetSparklines200Response()
+ if include_optional:
+ return GetSparklines200Response(
+ sparklines = [
+ zrok_api.models.metrics.metrics(
+ scope = '',
+ id = '',
+ period = 1.337,
+ samples = [
+ zrok_api.models.metrics_sample.metricsSample(
+ rx = 1.337,
+ tx = 1.337,
+ timestamp = 1.337, )
+ ], )
+ ]
+ )
+ else:
+ return GetSparklines200Response(
+ )
+ """
+
+ def testGetSparklines200Response(self):
+ """Test GetSparklines200Response"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_get_sparklines_request.py b/sdk/python/sdk/zrok/test/test_get_sparklines_request.py
new file mode 100644
index 00000000..cd46979b
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_get_sparklines_request.py
@@ -0,0 +1,57 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.get_sparklines_request import GetSparklinesRequest
+
+class TestGetSparklinesRequest(unittest.TestCase):
+ """GetSparklinesRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GetSparklinesRequest:
+ """Test GetSparklinesRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `GetSparklinesRequest`
+ """
+ model = GetSparklinesRequest()
+ if include_optional:
+ return GetSparklinesRequest(
+ account = True,
+ environments = [
+ ''
+ ],
+ shares = [
+ ''
+ ]
+ )
+ else:
+ return GetSparklinesRequest(
+ )
+ """
+
+ def testGetSparklinesRequest(self):
+ """Test GetSparklinesRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_invite_request.py b/sdk/python/sdk/zrok/test/test_invite_request.py
new file mode 100644
index 00000000..a181ad3b
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_invite_request.py
@@ -0,0 +1,52 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.invite_request import InviteRequest
+
+class TestInviteRequest(unittest.TestCase):
+ """InviteRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> InviteRequest:
+ """Test InviteRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `InviteRequest`
+ """
+ model = InviteRequest()
+ if include_optional:
+ return InviteRequest(
+ email = '',
+ invite_token = ''
+ )
+ else:
+ return InviteRequest(
+ )
+ """
+
+ def testInviteRequest(self):
+ """Test InviteRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_invite_token_generate_request.py b/sdk/python/sdk/zrok/test/test_invite_token_generate_request.py
new file mode 100644
index 00000000..1a8c2c10
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_invite_token_generate_request.py
@@ -0,0 +1,53 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
+
+class TestInviteTokenGenerateRequest(unittest.TestCase):
+ """InviteTokenGenerateRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> InviteTokenGenerateRequest:
+ """Test InviteTokenGenerateRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `InviteTokenGenerateRequest`
+ """
+ model = InviteTokenGenerateRequest()
+ if include_optional:
+ return InviteTokenGenerateRequest(
+ invite_tokens = [
+ ''
+ ]
+ )
+ else:
+ return InviteTokenGenerateRequest(
+ )
+ """
+
+ def testInviteTokenGenerateRequest(self):
+ """Test InviteTokenGenerateRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_list_frontends200_response_inner.py b/sdk/python/sdk/zrok/test/test_list_frontends200_response_inner.py
new file mode 100644
index 00000000..2e21b24d
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_list_frontends200_response_inner.py
@@ -0,0 +1,56 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner
+
+class TestListFrontends200ResponseInner(unittest.TestCase):
+ """ListFrontends200ResponseInner unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ListFrontends200ResponseInner:
+ """Test ListFrontends200ResponseInner
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ListFrontends200ResponseInner`
+ """
+ model = ListFrontends200ResponseInner()
+ if include_optional:
+ return ListFrontends200ResponseInner(
+ frontend_token = '',
+ z_id = '',
+ url_template = '',
+ public_name = '',
+ created_at = 56,
+ updated_at = 56
+ )
+ else:
+ return ListFrontends200ResponseInner(
+ )
+ """
+
+ def testListFrontends200ResponseInner(self):
+ """Test ListFrontends200ResponseInner"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_list_memberships200_response.py b/sdk/python/sdk/zrok/test/test_list_memberships200_response.py
new file mode 100644
index 00000000..d23ac2dd
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_list_memberships200_response.py
@@ -0,0 +1,56 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.list_memberships200_response import ListMemberships200Response
+
+class TestListMemberships200Response(unittest.TestCase):
+ """ListMemberships200Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ListMemberships200Response:
+ """Test ListMemberships200Response
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ListMemberships200Response`
+ """
+ model = ListMemberships200Response()
+ if include_optional:
+ return ListMemberships200Response(
+ memberships = [
+ zrok_api.models.list_memberships_200_response_memberships_inner.listMemberships_200_response_memberships_inner(
+ organization_token = '',
+ description = '',
+ admin = True, )
+ ]
+ )
+ else:
+ return ListMemberships200Response(
+ )
+ """
+
+ def testListMemberships200Response(self):
+ """Test ListMemberships200Response"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_list_memberships200_response_memberships_inner.py b/sdk/python/sdk/zrok/test/test_list_memberships200_response_memberships_inner.py
new file mode 100644
index 00000000..2f7cf7ff
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_list_memberships200_response_memberships_inner.py
@@ -0,0 +1,53 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner
+
+class TestListMemberships200ResponseMembershipsInner(unittest.TestCase):
+ """ListMemberships200ResponseMembershipsInner unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ListMemberships200ResponseMembershipsInner:
+ """Test ListMemberships200ResponseMembershipsInner
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ListMemberships200ResponseMembershipsInner`
+ """
+ model = ListMemberships200ResponseMembershipsInner()
+ if include_optional:
+ return ListMemberships200ResponseMembershipsInner(
+ organization_token = '',
+ description = '',
+ admin = True
+ )
+ else:
+ return ListMemberships200ResponseMembershipsInner(
+ )
+ """
+
+ def testListMemberships200ResponseMembershipsInner(self):
+ """Test ListMemberships200ResponseMembershipsInner"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_list_organization_members200_response.py b/sdk/python/sdk/zrok/test/test_list_organization_members200_response.py
new file mode 100644
index 00000000..8020c6c7
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_list_organization_members200_response.py
@@ -0,0 +1,55 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response
+
+class TestListOrganizationMembers200Response(unittest.TestCase):
+ """ListOrganizationMembers200Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ListOrganizationMembers200Response:
+ """Test ListOrganizationMembers200Response
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ListOrganizationMembers200Response`
+ """
+ model = ListOrganizationMembers200Response()
+ if include_optional:
+ return ListOrganizationMembers200Response(
+ members = [
+ zrok_api.models.list_organization_members_200_response_members_inner.listOrganizationMembers_200_response_members_inner(
+ email = '',
+ admin = True, )
+ ]
+ )
+ else:
+ return ListOrganizationMembers200Response(
+ )
+ """
+
+ def testListOrganizationMembers200Response(self):
+ """Test ListOrganizationMembers200Response"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_list_organization_members200_response_members_inner.py b/sdk/python/sdk/zrok/test/test_list_organization_members200_response_members_inner.py
new file mode 100644
index 00000000..28cea33f
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_list_organization_members200_response_members_inner.py
@@ -0,0 +1,52 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner
+
+class TestListOrganizationMembers200ResponseMembersInner(unittest.TestCase):
+ """ListOrganizationMembers200ResponseMembersInner unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ListOrganizationMembers200ResponseMembersInner:
+ """Test ListOrganizationMembers200ResponseMembersInner
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ListOrganizationMembers200ResponseMembersInner`
+ """
+ model = ListOrganizationMembers200ResponseMembersInner()
+ if include_optional:
+ return ListOrganizationMembers200ResponseMembersInner(
+ email = '',
+ admin = True
+ )
+ else:
+ return ListOrganizationMembers200ResponseMembersInner(
+ )
+ """
+
+ def testListOrganizationMembers200ResponseMembersInner(self):
+ """Test ListOrganizationMembers200ResponseMembersInner"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_list_organizations200_response.py b/sdk/python/sdk/zrok/test/test_list_organizations200_response.py
new file mode 100644
index 00000000..7133529e
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_list_organizations200_response.py
@@ -0,0 +1,55 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.list_organizations200_response import ListOrganizations200Response
+
+class TestListOrganizations200Response(unittest.TestCase):
+ """ListOrganizations200Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ListOrganizations200Response:
+ """Test ListOrganizations200Response
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ListOrganizations200Response`
+ """
+ model = ListOrganizations200Response()
+ if include_optional:
+ return ListOrganizations200Response(
+ organizations = [
+ zrok_api.models.list_organizations_200_response_organizations_inner.listOrganizations_200_response_organizations_inner(
+ organization_token = '',
+ description = '', )
+ ]
+ )
+ else:
+ return ListOrganizations200Response(
+ )
+ """
+
+ def testListOrganizations200Response(self):
+ """Test ListOrganizations200Response"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_list_organizations200_response_organizations_inner.py b/sdk/python/sdk/zrok/test/test_list_organizations200_response_organizations_inner.py
new file mode 100644
index 00000000..6d857ae1
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_list_organizations200_response_organizations_inner.py
@@ -0,0 +1,52 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
+
+class TestListOrganizations200ResponseOrganizationsInner(unittest.TestCase):
+ """ListOrganizations200ResponseOrganizationsInner unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ListOrganizations200ResponseOrganizationsInner:
+ """Test ListOrganizations200ResponseOrganizationsInner
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ListOrganizations200ResponseOrganizationsInner`
+ """
+ model = ListOrganizations200ResponseOrganizationsInner()
+ if include_optional:
+ return ListOrganizations200ResponseOrganizationsInner(
+ organization_token = '',
+ description = ''
+ )
+ else:
+ return ListOrganizations200ResponseOrganizationsInner(
+ )
+ """
+
+ def testListOrganizations200ResponseOrganizationsInner(self):
+ """Test ListOrganizations200ResponseOrganizationsInner"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_login_request.py b/sdk/python/sdk/zrok/test/test_login_request.py
new file mode 100644
index 00000000..1a4c2642
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_login_request.py
@@ -0,0 +1,52 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.login_request import LoginRequest
+
+class TestLoginRequest(unittest.TestCase):
+ """LoginRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> LoginRequest:
+ """Test LoginRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `LoginRequest`
+ """
+ model = LoginRequest()
+ if include_optional:
+ return LoginRequest(
+ email = '',
+ password = ''
+ )
+ else:
+ return LoginRequest(
+ )
+ """
+
+ def testLoginRequest(self):
+ """Test LoginRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_regenerate_account_token200_response.py b/sdk/python/sdk/zrok/test/test_regenerate_account_token200_response.py
new file mode 100644
index 00000000..a94c4678
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_regenerate_account_token200_response.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response
+
+class TestRegenerateAccountToken200Response(unittest.TestCase):
+ """RegenerateAccountToken200Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> RegenerateAccountToken200Response:
+ """Test RegenerateAccountToken200Response
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `RegenerateAccountToken200Response`
+ """
+ model = RegenerateAccountToken200Response()
+ if include_optional:
+ return RegenerateAccountToken200Response(
+ account_token = ''
+ )
+ else:
+ return RegenerateAccountToken200Response(
+ )
+ """
+
+ def testRegenerateAccountToken200Response(self):
+ """Test RegenerateAccountToken200Response"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_regenerate_account_token_request.py b/sdk/python/sdk/zrok/test/test_regenerate_account_token_request.py
new file mode 100644
index 00000000..b6e0b4bd
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_regenerate_account_token_request.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest
+
+class TestRegenerateAccountTokenRequest(unittest.TestCase):
+ """RegenerateAccountTokenRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> RegenerateAccountTokenRequest:
+ """Test RegenerateAccountTokenRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `RegenerateAccountTokenRequest`
+ """
+ model = RegenerateAccountTokenRequest()
+ if include_optional:
+ return RegenerateAccountTokenRequest(
+ email_address = ''
+ )
+ else:
+ return RegenerateAccountTokenRequest(
+ )
+ """
+
+ def testRegenerateAccountTokenRequest(self):
+ """Test RegenerateAccountTokenRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_register_request.py b/sdk/python/sdk/zrok/test/test_register_request.py
new file mode 100644
index 00000000..e026b200
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_register_request.py
@@ -0,0 +1,52 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.register_request import RegisterRequest
+
+class TestRegisterRequest(unittest.TestCase):
+ """RegisterRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> RegisterRequest:
+ """Test RegisterRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `RegisterRequest`
+ """
+ model = RegisterRequest()
+ if include_optional:
+ return RegisterRequest(
+ register_token = '',
+ password = ''
+ )
+ else:
+ return RegisterRequest(
+ )
+ """
+
+ def testRegisterRequest(self):
+ """Test RegisterRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_remove_organization_member_request.py b/sdk/python/sdk/zrok/test/test_remove_organization_member_request.py
new file mode 100644
index 00000000..abf89606
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_remove_organization_member_request.py
@@ -0,0 +1,52 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest
+
+class TestRemoveOrganizationMemberRequest(unittest.TestCase):
+ """RemoveOrganizationMemberRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> RemoveOrganizationMemberRequest:
+ """Test RemoveOrganizationMemberRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `RemoveOrganizationMemberRequest`
+ """
+ model = RemoveOrganizationMemberRequest()
+ if include_optional:
+ return RemoveOrganizationMemberRequest(
+ organization_token = '',
+ email = ''
+ )
+ else:
+ return RemoveOrganizationMemberRequest(
+ )
+ """
+
+ def testRemoveOrganizationMemberRequest(self):
+ """Test RemoveOrganizationMemberRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_reset_password_request.py b/sdk/python/sdk/zrok/test/test_reset_password_request.py
new file mode 100644
index 00000000..2c047502
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_reset_password_request.py
@@ -0,0 +1,52 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.reset_password_request import ResetPasswordRequest
+
+class TestResetPasswordRequest(unittest.TestCase):
+ """ResetPasswordRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResetPasswordRequest:
+ """Test ResetPasswordRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ResetPasswordRequest`
+ """
+ model = ResetPasswordRequest()
+ if include_optional:
+ return ResetPasswordRequest(
+ reset_token = '',
+ password = ''
+ )
+ else:
+ return ResetPasswordRequest(
+ )
+ """
+
+ def testResetPasswordRequest(self):
+ """Test ResetPasswordRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_unaccess_request.py b/sdk/python/sdk/zrok/test/test_unaccess_request.py
new file mode 100644
index 00000000..ade50dff
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_unaccess_request.py
@@ -0,0 +1,53 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.unaccess_request import UnaccessRequest
+
+class TestUnaccessRequest(unittest.TestCase):
+ """UnaccessRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UnaccessRequest:
+ """Test UnaccessRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `UnaccessRequest`
+ """
+ model = UnaccessRequest()
+ if include_optional:
+ return UnaccessRequest(
+ frontend_token = '',
+ env_zid = '',
+ share_token = ''
+ )
+ else:
+ return UnaccessRequest(
+ )
+ """
+
+ def testUnaccessRequest(self):
+ """Test UnaccessRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_unshare_request.py b/sdk/python/sdk/zrok/test/test_unshare_request.py
new file mode 100644
index 00000000..f0eccf47
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_unshare_request.py
@@ -0,0 +1,53 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.unshare_request import UnshareRequest
+
+class TestUnshareRequest(unittest.TestCase):
+ """UnshareRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UnshareRequest:
+ """Test UnshareRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `UnshareRequest`
+ """
+ model = UnshareRequest()
+ if include_optional:
+ return UnshareRequest(
+ env_zid = '',
+ share_token = '',
+ reserved = True
+ )
+ else:
+ return UnshareRequest(
+ )
+ """
+
+ def testUnshareRequest(self):
+ """Test UnshareRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_update_access_request.py b/sdk/python/sdk/zrok/test/test_update_access_request.py
new file mode 100644
index 00000000..02c028bf
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_update_access_request.py
@@ -0,0 +1,53 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.update_access_request import UpdateAccessRequest
+
+class TestUpdateAccessRequest(unittest.TestCase):
+ """UpdateAccessRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UpdateAccessRequest:
+ """Test UpdateAccessRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `UpdateAccessRequest`
+ """
+ model = UpdateAccessRequest()
+ if include_optional:
+ return UpdateAccessRequest(
+ frontend_token = '',
+ bind_address = '',
+ description = ''
+ )
+ else:
+ return UpdateAccessRequest(
+ )
+ """
+
+ def testUpdateAccessRequest(self):
+ """Test UpdateAccessRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_update_frontend_request.py b/sdk/python/sdk/zrok/test/test_update_frontend_request.py
new file mode 100644
index 00000000..9546bbac
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_update_frontend_request.py
@@ -0,0 +1,53 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.update_frontend_request import UpdateFrontendRequest
+
+class TestUpdateFrontendRequest(unittest.TestCase):
+ """UpdateFrontendRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UpdateFrontendRequest:
+ """Test UpdateFrontendRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `UpdateFrontendRequest`
+ """
+ model = UpdateFrontendRequest()
+ if include_optional:
+ return UpdateFrontendRequest(
+ frontend_token = '',
+ public_name = '',
+ url_template = ''
+ )
+ else:
+ return UpdateFrontendRequest(
+ )
+ """
+
+ def testUpdateFrontendRequest(self):
+ """Test UpdateFrontendRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_update_share_request.py b/sdk/python/sdk/zrok/test/test_update_share_request.py
new file mode 100644
index 00000000..1d8df185
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_update_share_request.py
@@ -0,0 +1,58 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.update_share_request import UpdateShareRequest
+
+class TestUpdateShareRequest(unittest.TestCase):
+ """UpdateShareRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UpdateShareRequest:
+ """Test UpdateShareRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `UpdateShareRequest`
+ """
+ model = UpdateShareRequest()
+ if include_optional:
+ return UpdateShareRequest(
+ share_token = '',
+ backend_proxy_endpoint = '',
+ add_access_grants = [
+ ''
+ ],
+ remove_access_grants = [
+ ''
+ ]
+ )
+ else:
+ return UpdateShareRequest(
+ )
+ """
+
+ def testUpdateShareRequest(self):
+ """Test UpdateShareRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_verify200_response.py b/sdk/python/sdk/zrok/test/test_verify200_response.py
new file mode 100644
index 00000000..bf257b65
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_verify200_response.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.verify200_response import Verify200Response
+
+class TestVerify200Response(unittest.TestCase):
+ """Verify200Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> Verify200Response:
+ """Test Verify200Response
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `Verify200Response`
+ """
+ model = Verify200Response()
+ if include_optional:
+ return Verify200Response(
+ email = ''
+ )
+ else:
+ return Verify200Response(
+ )
+ """
+
+ def testVerify200Response(self):
+ """Test Verify200Response"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_verify_request.py b/sdk/python/sdk/zrok/test/test_verify_request.py
new file mode 100644
index 00000000..c6f45d94
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_verify_request.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.verify_request import VerifyRequest
+
+class TestVerifyRequest(unittest.TestCase):
+ """VerifyRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> VerifyRequest:
+ """Test VerifyRequest
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `VerifyRequest`
+ """
+ model = VerifyRequest()
+ if include_optional:
+ return VerifyRequest(
+ register_token = ''
+ )
+ else:
+ return VerifyRequest(
+ )
+ """
+
+ def testVerifyRequest(self):
+ """Test VerifyRequest"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/test/test_version_inventory200_response.py b/sdk/python/sdk/zrok/test/test_version_inventory200_response.py
new file mode 100644
index 00000000..7343fd1f
--- /dev/null
+++ b/sdk/python/sdk/zrok/test/test_version_inventory200_response.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from zrok_api.models.version_inventory200_response import VersionInventory200Response
+
+class TestVersionInventory200Response(unittest.TestCase):
+ """VersionInventory200Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> VersionInventory200Response:
+ """Test VersionInventory200Response
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `VersionInventory200Response`
+ """
+ model = VersionInventory200Response()
+ if include_optional:
+ return VersionInventory200Response(
+ controller_version = ''
+ )
+ else:
+ return VersionInventory200Response(
+ )
+ """
+
+ def testVersionInventory200Response(self):
+ """Test VersionInventory200Response"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sdk/python/sdk/zrok/zrok/api_client_wrapper.py b/sdk/python/sdk/zrok/zrok/api_client_wrapper.py
new file mode 100644
index 00000000..801608cc
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok/api_client_wrapper.py
@@ -0,0 +1,50 @@
+"""
+Custom API client wrapper for zrok_api that handles zrok-specific content types.
+"""
+
+import json
+import re
+from typing import Dict, Optional, Any, List, Tuple, Union
+
+from zrok_api.api_client import ApiClient
+from zrok_api.api_response import ApiResponse
+from zrok_api.rest import RESTResponse
+from zrok_api.exceptions import ApiException
+
+class ZrokApiClient(ApiClient):
+ """
+ Custom API client that extends the generated ApiClient to handle zrok-specific content types.
+ """
+
+ def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
+ """
+ Overrides the default deserialize method to handle zrok-specific content types.
+ """
+ # Handle application/zrok.v1+json as if it were application/json
+ if content_type and content_type.startswith("application/zrok.v1+json"):
+ if response_text == "":
+ data = ""
+ else:
+ try:
+ data = json.loads(response_text)
+ except ValueError:
+ data = response_text
+ elif content_type is None:
+ try:
+ data = json.loads(response_text)
+ except ValueError:
+ data = response_text
+ elif content_type.startswith("application/json"):
+ if response_text == "":
+ data = ""
+ else:
+ data = json.loads(response_text)
+ elif content_type.startswith("text/plain"):
+ data = response_text
+ else:
+ raise ApiException(
+ status=0,
+ reason="Unsupported content type: {0}".format(content_type)
+ )
+
+ return self._ApiClient__deserialize(data, response_type) # Access private method using name mangling
diff --git a/sdk/python/sdk/zrok/zrok/environment/root.py b/sdk/python/sdk/zrok/zrok/environment/root.py
index f12a18ba..df76324b 100644
--- a/sdk/python/sdk/zrok/zrok/environment/root.py
+++ b/sdk/python/sdk/zrok/zrok/environment/root.py
@@ -5,6 +5,7 @@ import os
import json
import zrok_api as zrok
from zrok_api.configuration import Configuration
+from ..api_client_wrapper import ZrokApiClient
import re
V = "v1.0"
@@ -42,7 +43,7 @@ class Root:
def HasConfig(self) -> bool:
return self.cfg != Config()
- def Client(self) -> zrok.ApiClient:
+ def Client(self) -> ZrokApiClient:
apiEndpoint = self.ApiEndpoint()
cfg = Configuration()
@@ -50,9 +51,16 @@ class Root:
cfg.api_key["x-token"] = self.env.Token
cfg.api_key_prefix['Authorization'] = 'Bearer'
- zrock_client = zrok.ApiClient(configuration=cfg)
- self.client_version_check(zrock_client) # Perform version check
- return zrock_client
+ version_check_client = ZrokApiClient(configuration=cfg)
+ # Perform version check without authentication
+ self.client_version_check(version_check_client)
+
+ # Create a new client with the same configuration for authenticated requests
+ auth_client = ZrokApiClient(configuration=cfg)
+ # Explicitly set the x-token header in default_headers to ensure it's used
+ auth_client.set_default_header('x-token', self.env.Token)
+
+ return auth_client
def ApiEndpoint(self) -> ApiEndpoint:
apiEndpoint = "https://api.zrok.io"
@@ -89,11 +97,22 @@ class Root:
"""Check if the client version is compatible with the API."""
metadata_api = zrok.MetadataApi(zrock_client)
try:
- data, status_code, headers = metadata_api.client_version_check_with_http_info(body={"clientVersion": V})
+ # Create a request with NO authentication for version check
+ # We'll remove any authentication headers for this initial check
+ # The client's default_headers might already have x-token, so let's ensure this call doesn't use it
+ custom_headers = {}
+ for key, value in zrock_client.default_headers.items():
+ if key.lower() != 'x-token': # Skip the auth token header
+ custom_headers[key] = value
+
+ response = metadata_api.client_version_check_with_http_info(
+ body={"clientVersion": V},
+ _headers=custom_headers # Pass custom headers without auth token
+ )
# Check if the response status code is 200 OK
- if status_code != 200:
- raise Exception(f"Client version check failed: Unexpected status code {status_code}")
+ 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
diff --git a/sdk/python/sdk/zrok/zrok/overview.py b/sdk/python/sdk/zrok/zrok/overview.py
index f7b981eb..ccacfd35 100644
--- a/sdk/python/sdk/zrok/zrok/overview.py
+++ b/sdk/python/sdk/zrok/zrok/overview.py
@@ -6,7 +6,7 @@ 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.frontends import Frontends
+from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner
from zrok_api.models.share import Share
@@ -71,7 +71,7 @@ class Overview:
env_resources = EnvironmentAndResources(
environment=environment,
shares=share_list,
- frontends=Frontends() # Empty frontends for now as it's not in the input data
+ frontends=ListFrontends200ResponseInner() # Empty frontends for now as it's not in the input data
)
overview.environments.append(env_resources)
diff --git a/sdk/python/sdk/zrok/zrok_api/__init__.py b/sdk/python/sdk/zrok/zrok_api/__init__.py
index a231330e..bf54fba9 100644
--- a/sdk/python/sdk/zrok/zrok_api/__init__.py
+++ b/sdk/python/sdk/zrok/zrok_api/__init__.py
@@ -5,14 +5,16 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- OpenAPI spec version: 1.0.0
-
- Generated by: https://github.com/swagger-api/swagger-codegen.git
-"""
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
-from __future__ import absolute_import
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+__version__ = "1.0.0"
# import apis into sdk package
from zrok_api.api.account_api import AccountApi
@@ -20,70 +22,67 @@ 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_response import ApiResponse
from zrok_api.api_client import ApiClient
from zrok_api.configuration import Configuration
+from zrok_api.exceptions import OpenApiException
+from zrok_api.exceptions import ApiTypeError
+from zrok_api.exceptions import ApiValueError
+from zrok_api.exceptions import ApiKeyError
+from zrok_api.exceptions import ApiAttributeError
+from zrok_api.exceptions import ApiException
+
# 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.access201_response import Access201Response
+from zrok_api.models.access_request import AccessRequest
+from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest
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.change_password_request import ChangePasswordRequest
+from zrok_api.models.client_version_check_request import ClientVersionCheckRequest
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.create_frontend201_response import CreateFrontend201Response
+from zrok_api.models.create_frontend_request import CreateFrontendRequest
+from zrok_api.models.create_identity201_response import CreateIdentity201Response
+from zrok_api.models.create_identity_request import CreateIdentityRequest
+from zrok_api.models.create_organization201_response import CreateOrganization201Response
+from zrok_api.models.create_organization_request import CreateOrganizationRequest
+from zrok_api.models.disable_request import DisableRequest
+from zrok_api.models.enable_request import EnableRequest
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.get_sparklines200_response import GetSparklines200Response
+from zrok_api.models.get_sparklines_request import GetSparklinesRequest
+from zrok_api.models.invite_request import InviteRequest
+from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
+from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner
+from zrok_api.models.list_memberships200_response import ListMemberships200Response
+from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner
+from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response
+from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner
+from zrok_api.models.list_organizations200_response import ListOrganizations200Response
+from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
+from zrok_api.models.login_request import LoginRequest
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.regenerate_account_token200_response import RegenerateAccountToken200Response
+from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest
+from zrok_api.models.register_request import RegisterRequest
+from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest
+from zrok_api.models.reset_password_request import ResetPasswordRequest
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
+from zrok_api.models.unaccess_request import UnaccessRequest
+from zrok_api.models.unshare_request import UnshareRequest
+from zrok_api.models.update_access_request import UpdateAccessRequest
+from zrok_api.models.update_frontend_request import UpdateFrontendRequest
+from zrok_api.models.update_share_request import UpdateShareRequest
+from zrok_api.models.verify200_response import Verify200Response
+from zrok_api.models.verify_request import VerifyRequest
+from zrok_api.models.version_inventory200_response import VersionInventory200Response
diff --git a/sdk/python/sdk/zrok/zrok_api/api/__init__.py b/sdk/python/sdk/zrok/zrok_api/api/__init__.py
index d07ab757..714f0a37 100644
--- a/sdk/python/sdk/zrok/zrok_api/api/__init__.py
+++ b/sdk/python/sdk/zrok/zrok_api/api/__init__.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import
-
# flake8: noqa
# import apis into api package
@@ -8,3 +6,4 @@ 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
index 8a85d9e1..7565f4a7 100644
--- a/sdk/python/sdk/zrok/zrok_api/api/account_api.py
+++ b/sdk/python/sdk/zrok/zrok_api/api/account_api.py
@@ -3,771 +3,2243 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from pydantic import StrictStr
+from typing import Optional
+from zrok_api.models.change_password_request import ChangePasswordRequest
+from zrok_api.models.invite_request import InviteRequest
+from zrok_api.models.login_request import LoginRequest
+from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response
+from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest
+from zrok_api.models.register_request import RegisterRequest
+from zrok_api.models.reset_password_request import ResetPasswordRequest
+from zrok_api.models.verify200_response import Verify200Response
+from zrok_api.models.verify_request import VerifyRequest
+
+from zrok_api.api_client import ApiClient, RequestSerialized
+from zrok_api.api_response import ApiResponse
+from zrok_api.rest import RESTResponseType
+
+
+class AccountApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
Do not edit the class manually.
- Ref: https://github.com/swagger-api/swagger-codegen
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
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()
+ @validate_call
+ def change_password(
+ self,
+ body: Optional[ChangePasswordRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """change_password
- :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
+
+ :param body:
+ :type body: ChangePasswordRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._change_password_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '400': None,
+ '401': None,
+ '422': "str",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def change_password_with_http_info(
+ self,
+ body: Optional[ChangePasswordRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """change_password
+
+
+ :param body:
+ :type body: ChangePasswordRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._change_password_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '400': None,
+ '401': None,
+ '422': "str",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def change_password_without_preload_content(
+ self,
+ body: Optional[ChangePasswordRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """change_password
+
+
+ :param body:
+ :type body: ChangePasswordRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._change_password_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '400': None,
+ '401': None,
+ '422': "str",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _change_password_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/changePassword',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def invite(
+ self,
+ body: Optional[InviteRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """invite
- # 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
+ :param body:
+ :type body: InviteRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._invite_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def invite(self, **kwargs): # noqa: E501
- """invite # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '400': "str",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def invite_with_http_info(
+ self,
+ body: Optional[InviteRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """invite
+
+
+ :param body:
+ :type body: InviteRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '400': "str",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def invite_without_preload_content(
+ self,
+ body: Optional[InviteRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """invite
+
+
+ :param body:
+ :type body: InviteRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '400': "str",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _invite_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/invite',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def login(
+ self,
+ body: Optional[LoginRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> str:
+ """login
- # 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
+ :param body:
+ :type body: LoginRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._login_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def login(self, **kwargs): # noqa: E501
- """login # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '401': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def login_with_http_info(
+ self,
+ body: Optional[LoginRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[str]:
+ """login
+
+
+ :param body:
+ :type body: LoginRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._login_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '401': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def login_without_preload_content(
+ self,
+ body: Optional[LoginRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """login
+
+
+ :param body:
+ :type body: LoginRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._login_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '401': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _login_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/login',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def regenerate_account_token(
+ self,
+ body: Optional[RegenerateAccountTokenRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RegenerateAccountToken200Response:
+ """regenerate_account_token
- # 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
+ :param body:
+ :type body: RegenerateAccountTokenRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._regenerate_account_token_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def regenerate_account_token(self, **kwargs): # noqa: E501
- """regenerate_account_token # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RegenerateAccountToken200Response",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def regenerate_account_token_with_http_info(
+ self,
+ body: Optional[RegenerateAccountTokenRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[RegenerateAccountToken200Response]:
+ """regenerate_account_token
+
+
+ :param body:
+ :type body: RegenerateAccountTokenRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._regenerate_account_token_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RegenerateAccountToken200Response",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def regenerate_account_token_without_preload_content(
+ self,
+ body: Optional[RegenerateAccountTokenRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """regenerate_account_token
+
+
+ :param body:
+ :type body: RegenerateAccountTokenRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._regenerate_account_token_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RegenerateAccountToken200Response",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _regenerate_account_token_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/regenerateAccountToken',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def register(
+ self,
+ body: Optional[RegisterRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RegenerateAccountToken200Response:
+ """register
- # 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
+ :param body:
+ :type body: RegisterRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._register_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def register(self, **kwargs): # noqa: E501
- """register # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RegenerateAccountToken200Response",
+ '404': None,
+ '422': "str",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def register_with_http_info(
+ self,
+ body: Optional[RegisterRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[RegenerateAccountToken200Response]:
+ """register
+
+
+ :param body:
+ :type body: RegisterRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._register_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RegenerateAccountToken200Response",
+ '404': None,
+ '422': "str",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def register_without_preload_content(
+ self,
+ body: Optional[RegisterRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """register
+
+
+ :param body:
+ :type body: RegisterRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._register_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RegenerateAccountToken200Response",
+ '404': None,
+ '422': "str",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _register_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/register',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def reset_password(
+ self,
+ body: Optional[ResetPasswordRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """reset_password
- # 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
+ :param body:
+ :type body: ResetPasswordRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._reset_password_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def reset_password(self, **kwargs): # noqa: E501
- """reset_password # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '404': None,
+ '422': "str",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def reset_password_with_http_info(
+ self,
+ body: Optional[ResetPasswordRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """reset_password
+
+
+ :param body:
+ :type body: ResetPasswordRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._reset_password_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '404': None,
+ '422': "str",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def reset_password_without_preload_content(
+ self,
+ body: Optional[ResetPasswordRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """reset_password
+
+
+ :param body:
+ :type body: ResetPasswordRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._reset_password_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '404': None,
+ '422': "str",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _reset_password_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/resetPassword',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def reset_password_request(
+ self,
+ body: Optional[RegenerateAccountTokenRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """reset_password_request
- # 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
+ :param body:
+ :type body: RegenerateAccountTokenRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._reset_password_request_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def reset_password_request(self, **kwargs): # noqa: E501
- """reset_password_request # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '400': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def reset_password_request_with_http_info(
+ self,
+ body: Optional[RegenerateAccountTokenRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """reset_password_request
+
+
+ :param body:
+ :type body: RegenerateAccountTokenRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._reset_password_request_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '400': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def reset_password_request_without_preload_content(
+ self,
+ body: Optional[RegenerateAccountTokenRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """reset_password_request
+
+
+ :param body:
+ :type body: RegenerateAccountTokenRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._reset_password_request_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '400': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _reset_password_request_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/resetPasswordRequest',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def verify(
+ self,
+ body: Optional[VerifyRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> Verify200Response:
+ """verify
- # 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)
+ :param body:
+ :type body: VerifyRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
- def verify(self, **kwargs): # noqa: E501
- """verify # noqa: E501
+ _param = self._verify_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- 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()
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Verify200Response",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- :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
+
+ @validate_call
+ def verify_with_http_info(
+ self,
+ body: Optional[VerifyRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[Verify200Response]:
+ """verify
+
+
+ :param body:
+ :type body: VerifyRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._verify_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Verify200Response",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def verify_without_preload_content(
+ self,
+ body: Optional[VerifyRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """verify
+
+
+ :param body:
+ :type body: VerifyRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._verify_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Verify200Response",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _verify_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/verify',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
index 081dbe65..d99d3d3b 100644
--- a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py
+++ b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py
@@ -3,1289 +3,3825 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from typing import List, Optional
+from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest
+from zrok_api.models.create_frontend201_response import CreateFrontend201Response
+from zrok_api.models.create_frontend_request import CreateFrontendRequest
+from zrok_api.models.create_identity201_response import CreateIdentity201Response
+from zrok_api.models.create_identity_request import CreateIdentityRequest
+from zrok_api.models.create_organization201_response import CreateOrganization201Response
+from zrok_api.models.create_organization_request import CreateOrganizationRequest
+from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
+from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner
+from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response
+from zrok_api.models.list_organizations200_response import ListOrganizations200Response
+from zrok_api.models.login_request import LoginRequest
+from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response
+from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest
+from zrok_api.models.update_frontend_request import UpdateFrontendRequest
+from zrok_api.models.verify200_response import Verify200Response
+
+from zrok_api.api_client import ApiClient, RequestSerialized
+from zrok_api.api_response import ApiResponse
+from zrok_api.rest import RESTResponseType
+
+
+class AdminApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
Do not edit the class manually.
- Ref: https://github.com/swagger-api/swagger-codegen
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
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()
+ @validate_call
+ def add_organization_member(
+ self,
+ body: Optional[AddOrganizationMemberRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """add_organization_member
- :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
+
+ :param body:
+ :type body: AddOrganizationMemberRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_organization_member_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def add_organization_member_with_http_info(
+ self,
+ body: Optional[AddOrganizationMemberRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """add_organization_member
+
+
+ :param body:
+ :type body: AddOrganizationMemberRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_organization_member_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def add_organization_member_without_preload_content(
+ self,
+ body: Optional[AddOrganizationMemberRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """add_organization_member
+
+
+ :param body:
+ :type body: AddOrganizationMemberRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_organization_member_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_organization_member_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/organization/add',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def create_account(
+ self,
+ body: Optional[LoginRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RegenerateAccountToken200Response:
+ """create_account
- # 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)
+ :param body:
+ :type body: LoginRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
- def create_account(self, **kwargs): # noqa: E501
- """create_account # noqa: E501
+ _param = self._create_account_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- 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()
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "RegenerateAccountToken200Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- :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
+
+ @validate_call
+ def create_account_with_http_info(
+ self,
+ body: Optional[LoginRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[RegenerateAccountToken200Response]:
+ """create_account
+
+
+ :param body:
+ :type body: LoginRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_account_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "RegenerateAccountToken200Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_account_without_preload_content(
+ self,
+ body: Optional[LoginRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_account
+
+
+ :param body:
+ :type body: LoginRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_account_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "RegenerateAccountToken200Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_account_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/account',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def create_frontend(
+ self,
+ body: Optional[CreateFrontendRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateFrontend201Response:
+ """create_frontend
- # 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
+ :param body:
+ :type body: CreateFrontendRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._create_frontend_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def create_frontend(self, **kwargs): # noqa: E501
- """create_frontend # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateFrontend201Response",
+ '400': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def create_frontend_with_http_info(
+ self,
+ body: Optional[CreateFrontendRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateFrontend201Response]:
+ """create_frontend
+
+
+ :param body:
+ :type body: CreateFrontendRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_frontend_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateFrontend201Response",
+ '400': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_frontend_without_preload_content(
+ self,
+ body: Optional[CreateFrontendRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_frontend
+
+
+ :param body:
+ :type body: CreateFrontendRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_frontend_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateFrontend201Response",
+ '400': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_frontend_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/frontend',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def create_identity(
+ self,
+ body: Optional[CreateIdentityRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateIdentity201Response:
+ """create_identity
- # 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
+ :param body:
+ :type body: CreateIdentityRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._create_identity_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def create_identity(self, **kwargs): # noqa: E501
- """create_identity # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateIdentity201Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def create_identity_with_http_info(
+ self,
+ body: Optional[CreateIdentityRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateIdentity201Response]:
+ """create_identity
+
+
+ :param body:
+ :type body: CreateIdentityRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_identity_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateIdentity201Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_identity_without_preload_content(
+ self,
+ body: Optional[CreateIdentityRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_identity
+
+
+ :param body:
+ :type body: CreateIdentityRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_identity_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateIdentity201Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_identity_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/identity',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def create_organization(
+ self,
+ body: Optional[CreateOrganizationRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateOrganization201Response:
+ """create_organization
- # 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
+ :param body:
+ :type body: CreateOrganizationRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._create_organization_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def create_organization(self, **kwargs): # noqa: E501
- """create_organization # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateOrganization201Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def create_organization_with_http_info(
+ self,
+ body: Optional[CreateOrganizationRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateOrganization201Response]:
+ """create_organization
+
+
+ :param body:
+ :type body: CreateOrganizationRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_organization_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateOrganization201Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_organization_without_preload_content(
+ self,
+ body: Optional[CreateOrganizationRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_organization
+
+
+ :param body:
+ :type body: CreateOrganizationRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_organization_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateOrganization201Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_organization_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/organization',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def delete_frontend(
+ self,
+ body: Optional[CreateFrontend201Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_frontend
- # 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
+ :param body:
+ :type body: CreateFrontend201Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._delete_frontend_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def delete_frontend(self, **kwargs): # noqa: E501
- """delete_frontend # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def delete_frontend_with_http_info(
+ self,
+ body: Optional[CreateFrontend201Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_frontend
+
+
+ :param body:
+ :type body: CreateFrontend201Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_frontend_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_frontend_without_preload_content(
+ self,
+ body: Optional[CreateFrontend201Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_frontend
+
+
+ :param body:
+ :type body: CreateFrontend201Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_frontend_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_frontend_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/frontend',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def delete_organization(
+ self,
+ body: Optional[CreateOrganization201Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """delete_organization
- # 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)
+ :param body:
+ :type body: CreateOrganization201Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
- def delete_organization(self, **kwargs): # noqa: E501
- """delete_organization # noqa: E501
+ _param = self._delete_organization_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- 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()
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- :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
+
+ @validate_call
+ def delete_organization_with_http_info(
+ self,
+ body: Optional[CreateOrganization201Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """delete_organization
+
+
+ :param body:
+ :type body: CreateOrganization201Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_organization_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_organization_without_preload_content(
+ self,
+ body: Optional[CreateOrganization201Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """delete_organization
+
+
+ :param body:
+ :type body: CreateOrganization201Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_organization_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_organization_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/organization',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def grants(
+ self,
+ body: Optional[Verify200Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """grants
- # 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)
+ :param body:
+ :type body: Verify200Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
- def grants(self, **kwargs): # noqa: E501
- """grants # noqa: E501
+ _param = self._grants_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- 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()
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- :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
+
+ @validate_call
+ def grants_with_http_info(
+ self,
+ body: Optional[Verify200Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """grants
+
+
+ :param body:
+ :type body: Verify200Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._grants_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def grants_without_preload_content(
+ self,
+ body: Optional[Verify200Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """grants
+
+
+ :param body:
+ :type body: Verify200Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._grants_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _grants_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/grants',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def invite_token_generate(
+ self,
+ body: Optional[InviteTokenGenerateRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """invite_token_generate
- # 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)
+ :param body:
+ :type body: InviteTokenGenerateRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
- def invite_token_generate(self, **kwargs): # noqa: E501
- """invite_token_generate # noqa: E501
+ _param = self._invite_token_generate_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- 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()
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '400': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- :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
+
+ @validate_call
+ def invite_token_generate_with_http_info(
+ self,
+ body: Optional[InviteTokenGenerateRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """invite_token_generate
+
+
+ :param body:
+ :type body: InviteTokenGenerateRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_token_generate_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '400': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def invite_token_generate_without_preload_content(
+ self,
+ body: Optional[InviteTokenGenerateRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """invite_token_generate
+
+
+ :param body:
+ :type body: InviteTokenGenerateRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._invite_token_generate_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': None,
+ '400': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _invite_token_generate_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/invite/token/generate',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def list_frontends(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[ListFrontends200ResponseInner]:
+ """list_frontends
- # 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)
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
- def list_frontends(self, **kwargs): # noqa: E501
- """list_frontends # noqa: E501
+ _param = self._list_frontends_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- 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()
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListFrontends200ResponseInner]",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- :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
+
+ @validate_call
+ def list_frontends_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[ListFrontends200ResponseInner]]:
+ """list_frontends
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_frontends_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListFrontends200ResponseInner]",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_frontends_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_frontends
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_frontends_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ListFrontends200ResponseInner]",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_frontends_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/frontends',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_organization_members(
+ self,
+ body: Optional[CreateOrganization201Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListOrganizationMembers200Response:
+ """list_organization_members
+
+
+ :param body:
+ :type body: CreateOrganization201Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_organization_members_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListOrganizationMembers200Response",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_organization_members_with_http_info(
+ self,
+ body: Optional[CreateOrganization201Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListOrganizationMembers200Response]:
+ """list_organization_members
+
+
+ :param body:
+ :type body: CreateOrganization201Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_organization_members_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListOrganizationMembers200Response",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_organization_members_without_preload_content(
+ self,
+ body: Optional[CreateOrganization201Response] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_organization_members
+
+
+ :param body:
+ :type body: CreateOrganization201Response
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_organization_members_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListOrganizationMembers200Response",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_organization_members_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/organization/list',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def list_organizations(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListOrganizations200Response:
+ """list_organizations
- # 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)
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
- def list_organization_members(self, **kwargs): # noqa: E501
- """list_organization_members # noqa: E501
+ _param = self._list_organizations_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- 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()
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListOrganizations200Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- :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
+
+ @validate_call
+ def list_organizations_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListOrganizations200Response]:
+ """list_organizations
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_organizations_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListOrganizations200Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_organizations_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_organizations
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_organizations_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListOrganizations200Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_organizations_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/organizations',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def remove_organization_member(
+ self,
+ body: Optional[RemoveOrganizationMemberRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """remove_organization_member
+
+
+ :param body:
+ :type body: RemoveOrganizationMemberRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._remove_organization_member_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def remove_organization_member_with_http_info(
+ self,
+ body: Optional[RemoveOrganizationMemberRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """remove_organization_member
+
+
+ :param body:
+ :type body: RemoveOrganizationMemberRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._remove_organization_member_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def remove_organization_member_without_preload_content(
+ self,
+ body: Optional[RemoveOrganizationMemberRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """remove_organization_member
+
+
+ :param body:
+ :type body: RemoveOrganizationMemberRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._remove_organization_member_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _remove_organization_member_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/organization/remove',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def update_frontend(
+ self,
+ body: Optional[UpdateFrontendRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """update_frontend
- # 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
+ :param body:
+ :type body: UpdateFrontendRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._update_frontend_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def list_organizations(self, **kwargs): # noqa: E501
- """list_organizations # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def update_frontend_with_http_info(
+ self,
+ body: Optional[UpdateFrontendRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """update_frontend
+
+
+ :param body:
+ :type body: UpdateFrontendRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_frontend_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_frontend_without_preload_content(
+ self,
+ body: Optional[UpdateFrontendRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_frontend
+
+
+ :param body:
+ :type body: UpdateFrontendRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_frontend_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_frontend_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/frontend',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
index 16bc987e..ded46760 100644
--- a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py
+++ b/sdk/python/sdk/zrok/zrok_api/api/environment_api.py
@@ -3,213 +3,583 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from typing import Optional
+from zrok_api.models.create_identity201_response import CreateIdentity201Response
+from zrok_api.models.disable_request import DisableRequest
+from zrok_api.models.enable_request import EnableRequest
+
+from zrok_api.api_client import ApiClient, RequestSerialized
+from zrok_api.api_response import ApiResponse
+from zrok_api.rest import RESTResponseType
+
+
+class EnvironmentApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
Do not edit the class manually.
- Ref: https://github.com/swagger-api/swagger-codegen
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
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()
+ @validate_call
+ def disable(
+ self,
+ body: Optional[DisableRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """disable
- :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
+
+ :param body:
+ :type body: DisableRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._disable_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def disable_with_http_info(
+ self,
+ body: Optional[DisableRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """disable
+
+
+ :param body:
+ :type body: DisableRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._disable_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def disable_without_preload_content(
+ self,
+ body: Optional[DisableRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """disable
+
+
+ :param body:
+ :type body: DisableRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._disable_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _disable_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/disable',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def enable(
+ self,
+ body: Optional[EnableRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateIdentity201Response:
+ """enable
- # 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)
+ :param body:
+ :type body: EnableRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
- def enable(self, **kwargs): # noqa: E501
- """enable # noqa: E501
+ _param = self._enable_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- 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()
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateIdentity201Response",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- :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
+
+ @validate_call
+ def enable_with_http_info(
+ self,
+ body: Optional[EnableRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateIdentity201Response]:
+ """enable
+
+
+ :param body:
+ :type body: EnableRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._enable_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateIdentity201Response",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def enable_without_preload_content(
+ self,
+ body: Optional[EnableRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """enable
+
+
+ :param body:
+ :type body: EnableRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._enable_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateIdentity201Response",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _enable_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/enable',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
index 6db4a488..8ade5b51 100644
--- a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py
+++ b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py
@@ -3,1484 +3,4208 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from pydantic import StrictInt, StrictStr
+from typing import List, Optional
+from zrok_api.models.client_version_check_request import ClientVersionCheckRequest
+from zrok_api.models.configuration import Configuration
+from zrok_api.models.environment import Environment
+from zrok_api.models.environment_and_resources import EnvironmentAndResources
+from zrok_api.models.frontend import Frontend
+from zrok_api.models.get_sparklines200_response import GetSparklines200Response
+from zrok_api.models.get_sparklines_request import GetSparklinesRequest
+from zrok_api.models.list_memberships200_response import ListMemberships200Response
+from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response
+from zrok_api.models.metrics import Metrics
+from zrok_api.models.overview import Overview
+from zrok_api.models.share import Share
+from zrok_api.models.version_inventory200_response import VersionInventory200Response
+
+from zrok_api.api_client import ApiClient, RequestSerialized
+from zrok_api.api_response import ApiResponse
+from zrok_api.rest import RESTResponseType
+
+
+class MetadataApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
Do not edit the class manually.
- Ref: https://github.com/swagger-api/swagger-codegen
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
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()
+ @validate_call
+ def client_version_check(
+ self,
+ body: Optional[ClientVersionCheckRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """client_version_check
- :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
+
+ :param body:
+ :type body: ClientVersionCheckRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._client_version_check_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '400': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def client_version_check_with_http_info(
+ self,
+ body: Optional[ClientVersionCheckRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """client_version_check
+
+
+ :param body:
+ :type body: ClientVersionCheckRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._client_version_check_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '400': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def client_version_check_without_preload_content(
+ self,
+ body: Optional[ClientVersionCheckRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """client_version_check
+
+
+ :param body:
+ :type body: ClientVersionCheckRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._client_version_check_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '400': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _client_version_check_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/clientVersionCheck',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def configuration(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> Configuration:
+ """configuration
- # 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
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
- return self.api_client.call_api(
- # '/version', 'POST',
- '/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)
+ _param = self._configuration_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def configuration(self, **kwargs): # noqa: E501
- """configuration # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Configuration",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def configuration_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[Configuration]:
+ """configuration
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._configuration_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Configuration",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def configuration_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """configuration
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._configuration_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Configuration",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _configuration_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/configuration',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_account_detail(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[Environment]:
+ """get_account_detail
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_detail_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[Environment]",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_account_detail_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[Environment]]:
+ """get_account_detail
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_detail_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[Environment]",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_account_detail_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_account_detail
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_detail_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[Environment]",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_account_detail_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/detail/account',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_account_metrics(
+ self,
+ duration: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> Metrics:
+ """get_account_metrics
+
+
+ :param duration:
+ :type duration: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_metrics_serialize(
+ duration=duration,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Metrics",
+ '400': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_account_metrics_with_http_info(
+ self,
+ duration: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[Metrics]:
+ """get_account_metrics
+
+
+ :param duration:
+ :type duration: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_metrics_serialize(
+ duration=duration,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Metrics",
+ '400': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_account_metrics_without_preload_content(
+ self,
+ duration: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_account_metrics
+
+
+ :param duration:
+ :type duration: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_metrics_serialize(
+ duration=duration,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Metrics",
+ '400': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_account_metrics_serialize(
+ self,
+ duration,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if duration is not None:
+
+ _query_params.append(('duration', duration))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/metrics/account',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_environment_detail(
+ self,
+ env_zid: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> EnvironmentAndResources:
+ """get_environment_detail
+
+
+ :param env_zid: (required)
+ :type env_zid: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_environment_detail_serialize(
+ env_zid=env_zid,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EnvironmentAndResources",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_environment_detail_with_http_info(
+ self,
+ env_zid: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[EnvironmentAndResources]:
+ """get_environment_detail
+
+
+ :param env_zid: (required)
+ :type env_zid: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_environment_detail_serialize(
+ env_zid=env_zid,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EnvironmentAndResources",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_environment_detail_without_preload_content(
+ self,
+ env_zid: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_environment_detail
+
+
+ :param env_zid: (required)
+ :type env_zid: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_environment_detail_serialize(
+ env_zid=env_zid,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EnvironmentAndResources",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_environment_detail_serialize(
+ self,
+ env_zid,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if env_zid is not None:
+ _path_params['envZId'] = env_zid
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/detail/environment/{envZId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_environment_metrics(
+ self,
+ env_id: StrictStr,
+ duration: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> Metrics:
+ """get_environment_metrics
+
+
+ :param env_id: (required)
+ :type env_id: str
+ :param duration:
+ :type duration: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_environment_metrics_serialize(
+ env_id=env_id,
+ duration=duration,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Metrics",
+ '400': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_environment_metrics_with_http_info(
+ self,
+ env_id: StrictStr,
+ duration: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[Metrics]:
+ """get_environment_metrics
+
+
+ :param env_id: (required)
+ :type env_id: str
+ :param duration:
+ :type duration: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_environment_metrics_serialize(
+ env_id=env_id,
+ duration=duration,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Metrics",
+ '400': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_environment_metrics_without_preload_content(
+ self,
+ env_id: StrictStr,
+ duration: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_environment_metrics
+
+
+ :param env_id: (required)
+ :type env_id: str
+ :param duration:
+ :type duration: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_environment_metrics_serialize(
+ env_id=env_id,
+ duration=duration,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Metrics",
+ '400': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_environment_metrics_serialize(
+ self,
+ env_id,
+ duration,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if env_id is not None:
+ _path_params['envId'] = env_id
+ # process the query parameters
+ if duration is not None:
+
+ _query_params.append(('duration', duration))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/metrics/environment/{envId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_frontend_detail(
+ self,
+ frontend_id: StrictInt,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> Frontend:
+ """get_frontend_detail
+
+
+ :param frontend_id: (required)
+ :type frontend_id: int
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_frontend_detail_serialize(
+ frontend_id=frontend_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Frontend",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_frontend_detail_with_http_info(
+ self,
+ frontend_id: StrictInt,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[Frontend]:
+ """get_frontend_detail
+
+
+ :param frontend_id: (required)
+ :type frontend_id: int
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_frontend_detail_serialize(
+ frontend_id=frontend_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Frontend",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_frontend_detail_without_preload_content(
+ self,
+ frontend_id: StrictInt,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_frontend_detail
+
+
+ :param frontend_id: (required)
+ :type frontend_id: int
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_frontend_detail_serialize(
+ frontend_id=frontend_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Frontend",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_frontend_detail_serialize(
+ self,
+ frontend_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if frontend_id is not None:
+ _path_params['frontendId'] = frontend_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/detail/frontend/{frontendId}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_share_detail(
+ self,
+ share_token: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> Share:
+ """get_share_detail
+
+
+ :param share_token: (required)
+ :type share_token: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_share_detail_serialize(
+ share_token=share_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Share",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_share_detail_with_http_info(
+ self,
+ share_token: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[Share]:
+ """get_share_detail
+
+
+ :param share_token: (required)
+ :type share_token: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_share_detail_serialize(
+ share_token=share_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Share",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_share_detail_without_preload_content(
+ self,
+ share_token: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_share_detail
+
+
+ :param share_token: (required)
+ :type share_token: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_share_detail_serialize(
+ share_token=share_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Share",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_share_detail_serialize(
+ self,
+ share_token,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if share_token is not None:
+ _path_params['shareToken'] = share_token
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/detail/share/{shareToken}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_share_metrics(
+ self,
+ share_token: StrictStr,
+ duration: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> Metrics:
+ """get_share_metrics
+
+
+ :param share_token: (required)
+ :type share_token: str
+ :param duration:
+ :type duration: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_share_metrics_serialize(
+ share_token=share_token,
+ duration=duration,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Metrics",
+ '400': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_share_metrics_with_http_info(
+ self,
+ share_token: StrictStr,
+ duration: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[Metrics]:
+ """get_share_metrics
+
+
+ :param share_token: (required)
+ :type share_token: str
+ :param duration:
+ :type duration: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_share_metrics_serialize(
+ share_token=share_token,
+ duration=duration,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Metrics",
+ '400': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_share_metrics_without_preload_content(
+ self,
+ share_token: StrictStr,
+ duration: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_share_metrics
+
+
+ :param share_token: (required)
+ :type share_token: str
+ :param duration:
+ :type duration: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_share_metrics_serialize(
+ share_token=share_token,
+ duration=duration,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Metrics",
+ '400': None,
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_share_metrics_serialize(
+ self,
+ share_token,
+ duration,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if share_token is not None:
+ _path_params['shareToken'] = share_token
+ # process the query parameters
+ if duration is not None:
+
+ _query_params.append(('duration', duration))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/metrics/share/{shareToken}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_sparklines(
+ self,
+ body: Optional[GetSparklinesRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetSparklines200Response:
+ """get_sparklines
+
+
+ :param body:
+ :type body: GetSparklinesRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_sparklines_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetSparklines200Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_sparklines_with_http_info(
+ self,
+ body: Optional[GetSparklinesRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetSparklines200Response]:
+ """get_sparklines
+
+
+ :param body:
+ :type body: GetSparklinesRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_sparklines_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetSparklines200Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_sparklines_without_preload_content(
+ self,
+ body: Optional[GetSparklinesRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_sparklines
+
+
+ :param body:
+ :type body: GetSparklinesRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_sparklines_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetSparklines200Response",
+ '401': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_sparklines_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- 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)
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/sparklines',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_memberships(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListMemberships200Response:
+ """list_memberships
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_memberships_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListMemberships200Response",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_memberships_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListMemberships200Response]:
+ """list_memberships
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_memberships_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListMemberships200Response",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_memberships_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_memberships
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_memberships_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListMemberships200Response",
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_memberships_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/memberships',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def list_org_members(
+ self,
+ organization_token: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ListOrganizationMembers200Response:
+ """list_org_members
+
+
+ :param organization_token: (required)
+ :type organization_token: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_org_members_serialize(
+ organization_token=organization_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListOrganizationMembers200Response",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def list_org_members_with_http_info(
+ self,
+ organization_token: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ListOrganizationMembers200Response]:
+ """list_org_members
+
+
+ :param organization_token: (required)
+ :type organization_token: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_org_members_serialize(
+ organization_token=organization_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListOrganizationMembers200Response",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def list_org_members_without_preload_content(
+ self,
+ organization_token: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """list_org_members
+
+
+ :param organization_token: (required)
+ :type organization_token: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._list_org_members_serialize(
+ organization_token=organization_token,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ListOrganizationMembers200Response",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_org_members_serialize(
+ self,
+ organization_token,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if organization_token is not None:
+ _path_params['organizationToken'] = organization_token
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/members/{organizationToken}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def org_account_overview(
+ self,
+ organization_token: StrictStr,
+ account_email: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> Overview:
+ """org_account_overview
+
+
+ :param organization_token: (required)
+ :type organization_token: str
+ :param account_email: (required)
+ :type account_email: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._org_account_overview_serialize(
+ organization_token=organization_token,
+ account_email=account_email,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Overview",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def org_account_overview_with_http_info(
+ self,
+ organization_token: StrictStr,
+ account_email: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[Overview]:
+ """org_account_overview
+
+
+ :param organization_token: (required)
+ :type organization_token: str
+ :param account_email: (required)
+ :type account_email: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._org_account_overview_serialize(
+ organization_token=organization_token,
+ account_email=account_email,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Overview",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def org_account_overview_without_preload_content(
+ self,
+ organization_token: StrictStr,
+ account_email: StrictStr,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """org_account_overview
+
+
+ :param organization_token: (required)
+ :type organization_token: str
+ :param account_email: (required)
+ :type account_email: str
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._org_account_overview_serialize(
+ organization_token=organization_token,
+ account_email=account_email,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Overview",
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _org_account_overview_serialize(
+ self,
+ organization_token,
+ account_email,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if organization_token is not None:
+ _path_params['organizationToken'] = organization_token
+ if account_email is not None:
+ _path_params['accountEmail'] = account_email
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/overview/{organizationToken}/{accountEmail}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def overview(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> Overview:
+ """overview
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._overview_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Overview",
+ '500': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def overview_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[Overview]:
+ """overview
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._overview_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Overview",
+ '500': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def overview_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """overview
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._overview_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Overview",
+ '500': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _overview_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/overview',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def version(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> str:
+ """version
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._version_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def version_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[str]:
+ """version
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._version_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def version_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """version
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._version_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _version_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/version',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def version_inventory(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> VersionInventory200Response:
+ """version_inventory
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._version_inventory_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VersionInventory200Response",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def version_inventory_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[VersionInventory200Response]:
+ """version_inventory
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._version_inventory_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VersionInventory200Response",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def version_inventory_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """version_inventory
+
+
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._version_inventory_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VersionInventory200Response",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _version_inventory_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/versions',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/api/share_api.py b/sdk/python/sdk/zrok/zrok_api/api/share_api.py
index 49362e17..955ca11b 100644
--- a/sdk/python/sdk/zrok/zrok_api/api/share_api.py
+++ b/sdk/python/sdk/zrok/zrok_api/api/share_api.py
@@ -3,577 +3,1698 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from typing import Optional
+from zrok_api.models.access201_response import Access201Response
+from zrok_api.models.access_request import AccessRequest
+from zrok_api.models.share_request import ShareRequest
+from zrok_api.models.share_response import ShareResponse
+from zrok_api.models.unaccess_request import UnaccessRequest
+from zrok_api.models.unshare_request import UnshareRequest
+from zrok_api.models.update_access_request import UpdateAccessRequest
+from zrok_api.models.update_share_request import UpdateShareRequest
+
+from zrok_api.api_client import ApiClient, RequestSerialized
+from zrok_api.api_response import ApiResponse
+from zrok_api.rest import RESTResponseType
+
+
+class ShareApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
Do not edit the class manually.
- Ref: https://github.com/swagger-api/swagger-codegen
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
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()
+ @validate_call
+ def access(
+ self,
+ body: Optional[AccessRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> Access201Response:
+ """access
- :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
+
+ :param body:
+ :type body: AccessRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._access_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "Access201Response",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def access_with_http_info(
+ self,
+ body: Optional[AccessRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[Access201Response]:
+ """access
+
+
+ :param body:
+ :type body: AccessRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._access_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "Access201Response",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def access_without_preload_content(
+ self,
+ body: Optional[AccessRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """access
+
+
+ :param body:
+ :type body: AccessRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._access_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "Access201Response",
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _access_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/access',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def share(
+ self,
+ body: Optional[ShareRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ShareResponse:
+ """share
- # 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
+ :param body:
+ :type body: ShareRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._share_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def share(self, **kwargs): # noqa: E501
- """share # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "ShareResponse",
+ '401': None,
+ '404': None,
+ '409': None,
+ '422': None,
+ '500': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def share_with_http_info(
+ self,
+ body: Optional[ShareRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ShareResponse]:
+ """share
+
+
+ :param body:
+ :type body: ShareRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._share_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "ShareResponse",
+ '401': None,
+ '404': None,
+ '409': None,
+ '422': None,
+ '500': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def share_without_preload_content(
+ self,
+ body: Optional[ShareRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """share
+
+
+ :param body:
+ :type body: ShareRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._share_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "ShareResponse",
+ '401': None,
+ '404': None,
+ '409': None,
+ '422': None,
+ '500': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _share_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/share',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def unaccess(
+ self,
+ body: Optional[UnaccessRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """unaccess
- # 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
+ :param body:
+ :type body: UnaccessRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._unaccess_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def unaccess(self, **kwargs): # noqa: E501
- """unaccess # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def unaccess_with_http_info(
+ self,
+ body: Optional[UnaccessRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """unaccess
+
+
+ :param body:
+ :type body: UnaccessRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unaccess_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def unaccess_without_preload_content(
+ self,
+ body: Optional[UnaccessRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """unaccess
+
+
+ :param body:
+ :type body: UnaccessRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unaccess_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _unaccess_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/unaccess',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def unshare(
+ self,
+ body: Optional[UnshareRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """unshare
- # 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)
+ :param body:
+ :type body: UnshareRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
- def unshare(self, **kwargs): # noqa: E501
- """unshare # noqa: E501
+ _param = self._unshare_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- 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()
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- :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
+
+ @validate_call
+ def unshare_with_http_info(
+ self,
+ body: Optional[UnshareRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """unshare
+
+
+ :param body:
+ :type body: UnshareRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unshare_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def unshare_without_preload_content(
+ self,
+ body: Optional[UnshareRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """unshare
+
+
+ :param body:
+ :type body: UnshareRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unshare_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': "str",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _unshare_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/zrok.v1+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/unshare',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def update_access(
+ self,
+ body: Optional[UpdateAccessRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """update_access
- # 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
+ :param body:
+ :type body: UpdateAccessRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # 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)
+ _param = self._update_access_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- def update_access(self, **kwargs): # noqa: E501
- """update_access # noqa: E501
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- 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
+ @validate_call
+ def update_access_with_http_info(
+ self,
+ body: Optional[UpdateAccessRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """update_access
+
+
+ :param body:
+ :type body: UpdateAccessRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_access_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_access_without_preload_content(
+ self,
+ body: Optional[UpdateAccessRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_access
+
+
+ :param body:
+ :type body: UpdateAccessRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_access_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_access_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/access',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
+ @validate_call
+ def update_share(
+ self,
+ body: Optional[UpdateShareRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """update_share
- # 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)
+ :param body:
+ :type body: UpdateShareRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
- def update_share(self, **kwargs): # noqa: E501
- """update_share # noqa: E501
+ _param = self._update_share_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
- 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()
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '400': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- :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
+
+ @validate_call
+ def update_share_with_http_info(
+ self,
+ body: Optional[UpdateShareRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """update_share
+
+
+ :param body:
+ :type body: UpdateShareRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_share_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '400': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_share_without_preload_content(
+ self,
+ body: Optional[UpdateShareRequest] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """update_share
+
+
+ :param body:
+ :type body: UpdateShareRequest
+ :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.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_share_serialize(
+ body=body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': None,
+ '400': None,
+ '401': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_share_serialize(
+ self,
+ body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
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
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/zrok.v1+json'
+ ]
)
- params[key] = val
- del params['kwargs']
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
- collection_formats = {}
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'key'
+ ]
- path_params = {}
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/share',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
- 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
index f917a79b..a9d8285f 100644
--- a/sdk/python/sdk/zrok/zrok_api/api_client.py
+++ b/sdk/python/sdk/zrok/zrok_api/api_client.py
@@ -1,44 +1,54 @@
# coding: utf-8
+
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # 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
+from dateutil.parser import parse
+from enum import Enum
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 urllib.parse import quote
+from typing import Tuple, Optional, List, Dict, Union
+from pydantic import SecretStr
from zrok_api.configuration import Configuration
+from zrok_api.api_response import ApiResponse, T as ApiResponseT
import zrok_api.models
from zrok_api import rest
+from zrok_api.exceptions import (
+ ApiValueError,
+ ApiException,
+ BadRequestException,
+ UnauthorizedException,
+ ForbiddenException,
+ NotFoundException,
+ ServiceException
+)
+RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]]
-class ApiClient(object):
- """Generic API client for Swagger client library builds.
+class ApiClient:
+ """Generic API client for OpenAPI client library builds.
- Swagger generic API client. This client handles the client-
+ OpenAPI 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
+ the methods and models for each application are generated from the OpenAPI
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
@@ -47,10 +57,10 @@ class ApiClient(object):
to the API
"""
- PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
+ PRIMITIVE_TYPES = (float, bool, bytes, str, int)
NATIVE_TYPES_MAPPING = {
'int': int,
- 'long': int if six.PY3 else long, # noqa: F821
+ 'long': int, # TODO remove as only py3 is supported?
'float': float,
'str': str,
'bool': bool,
@@ -58,25 +68,34 @@ class ApiClient(object):
'datetime': datetime.datetime,
'object': object,
}
+ _pool = None
- def __init__(self, configuration=None, header_name=None, header_value=None,
- cookie=None):
+ def __init__(
+ self,
+ configuration=None,
+ header_name=None,
+ header_value=None,
+ cookie=None
+ ) -> None:
+ # use default configuration if none is provided
if configuration is None:
- configuration = Configuration()
+ configuration = Configuration.get_default()
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'
+ self.user_agent = 'OpenAPI-Generator/1.0.0/python'
+ self.client_side_validation = configuration.client_side_validation
- def __del__(self):
- self.pool.close()
- self.pool.join()
+ def __enter__(self):
+ return self
+
+ def __exit__(self, exc_type, exc_value, traceback):
+ pass
@property
def user_agent(self):
@@ -90,12 +109,69 @@ class ApiClient(object):
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):
+
+ _default = None
+
+ @classmethod
+ def get_default(cls):
+ """Return new instance of ApiClient.
+
+ This method returns newly created, based on default constructor,
+ object of ApiClient class or returns a copy of default
+ ApiClient.
+
+ :return: The ApiClient object.
+ """
+ if cls._default is None:
+ cls._default = ApiClient()
+ return cls._default
+
+ @classmethod
+ def set_default(cls, default):
+ """Set default instance of ApiClient.
+
+ It stores default ApiClient.
+
+ :param default: object of ApiClient.
+ """
+ cls._default = default
+
+ def param_serialize(
+ self,
+ method,
+ resource_path,
+ path_params=None,
+ query_params=None,
+ header_params=None,
+ body=None,
+ post_params=None,
+ files=None, auth_settings=None,
+ collection_formats=None,
+ _host=None,
+ _request_auth=None
+ ) -> RequestSerialized:
+
+ """Builds the HTTP request params needed by the request.
+ :param method: Method to call.
+ :param resource_path: Path to method endpoint.
+ :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 files dict: key -> filename, value -> filepath,
+ for `multipart/form-data`.
+ :param collection_formats: dict of collection formats for path, query,
+ header, and post parameters.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :return: tuple of form (path, http_method, query_params, header_params,
+ body, post_params, files)
+ """
config = self.configuration
@@ -106,14 +182,17 @@ class ApiClient(object):
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))
+ 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)
+ 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(
@@ -121,113 +200,217 @@ class ApiClient(object):
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 = post_params if post_params else []
post_params = self.sanitize_for_serialization(post_params)
- post_params = self.parameters_to_tuples(post_params,
- collection_formats)
+ post_params = self.parameters_to_tuples(
+ post_params,
+ collection_formats
+ )
+ if files:
+ post_params.extend(self.files_parameters(files))
# auth setting
- self.update_params_for_auth(header_params, query_params, auth_settings)
+ self.update_params_for_auth(
+ header_params,
+ query_params,
+ auth_settings,
+ resource_path,
+ method,
+ body,
+ request_auth=_request_auth
+ )
# 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)
+ if _host is None or self.configuration.ignore_operation_servers:
+ url = self.configuration.host + resource_path
else:
- return (return_data, response_data.status,
- response_data.getheaders())
+ # use server/host defined in path or operation instead
+ url = _host + resource_path
+
+ # query parameters
+ if query_params:
+ query_params = self.sanitize_for_serialization(query_params)
+ url_query = self.parameters_to_url_query(
+ query_params,
+ collection_formats
+ )
+ url += "?" + url_query
+
+ return method, url, header_params, body, post_params
+
+
+ def call_api(
+ self,
+ method,
+ url,
+ header_params=None,
+ body=None,
+ post_params=None,
+ _request_timeout=None
+ ) -> rest.RESTResponse:
+ """Makes the HTTP request (synchronous)
+ :param method: Method to call.
+ :param url: Path to method endpoint.
+ :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 _request_timeout: timeout setting for this request.
+ :return: RESTResponse
+ """
+
+ try:
+ # perform request and return response
+ response_data = self.rest_client.request(
+ method, url,
+ headers=header_params,
+ body=body, post_params=post_params,
+ _request_timeout=_request_timeout
+ )
+
+ except ApiException as e:
+ raise e
+
+ return response_data
+
+ def response_deserialize(
+ self,
+ response_data: rest.RESTResponse,
+ response_types_map: Optional[Dict[str, ApiResponseT]]=None
+ ) -> ApiResponse[ApiResponseT]:
+ """Deserializes response into an object.
+ :param response_data: RESTResponse object to be deserialized.
+ :param response_types_map: dict of response types.
+ :return: ApiResponse
+ """
+
+ msg = "RESTResponse.read() must be called before passing it to response_deserialize()"
+ assert response_data.data is not None, msg
+
+ response_type = response_types_map.get(str(response_data.status), None)
+ if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599:
+ # if not found, look for '1XX', '2XX', etc.
+ response_type = response_types_map.get(str(response_data.status)[0] + "XX", None)
+
+ # deserialize response data
+ response_text = None
+ return_data = None
+ try:
+ if response_type == "bytearray":
+ return_data = response_data.data
+ elif response_type == "file":
+ return_data = self.__deserialize_file(response_data)
+ elif response_type is not None:
+ match = None
+ content_type = response_data.getheader('content-type')
+ if content_type is not None:
+ match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
+ encoding = match.group(1) if match else "utf-8"
+ response_text = response_data.data.decode(encoding)
+ return_data = self.deserialize(response_text, response_type, content_type)
+ finally:
+ if not 200 <= response_data.status <= 299:
+ raise ApiException.from_response(
+ http_resp=response_data,
+ body=response_text,
+ data=return_data,
+ )
+
+ return ApiResponse(
+ status_code = response_data.status,
+ data = return_data,
+ headers = response_data.getheaders(),
+ raw_data = response_data.data
+ )
def sanitize_for_serialization(self, obj):
"""Builds a JSON POST object.
If obj is None, return None.
+ If obj is SecretStr, return obj.get_secret_value()
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.
+ If obj is OpenAPI 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, Enum):
+ return obj.value
+ elif isinstance(obj, SecretStr):
+ return obj.get_secret_value()
elif isinstance(obj, self.PRIMITIVE_TYPES):
return obj
elif isinstance(obj, list):
- return [self.sanitize_for_serialization(sub_obj)
- for sub_obj in obj]
+ 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)
+ 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):
+ elif isinstance(obj, dict):
obj_dict = obj
else:
# Convert model obj to dict except
- # attributes `swagger_types`, `attribute_map`
+ # attributes `openapi_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}
+ if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')):
+ obj_dict = obj.to_dict()
+ else:
+ obj_dict = obj.__dict__
- return {key: self.sanitize_for_serialization(val)
- for key, val in six.iteritems(obj_dict)}
+ return {
+ key: self.sanitize_for_serialization(val)
+ for key, val in obj_dict.items()
+ }
- def deserialize(self, response, response_type):
+ def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
"""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.
+ :param content_type: content type of response.
: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
+ if content_type is None:
+ try:
+ data = json.loads(response_text)
+ except ValueError:
+ data = response_text
+ elif content_type.startswith("application/json"):
+ if response_text == "":
+ data = ""
+ else:
+ data = json.loads(response_text)
+ elif content_type.startswith("text/plain"):
+ data = response_text
+ else:
+ raise ApiException(
+ status=0,
+ reason="Unsupported content type: {0}".format(content_type)
+ )
return self.__deserialize(data, response_type)
@@ -242,16 +425,20 @@ class ApiClient(object):
if data is None:
return None
- if type(klass) == str:
- if klass.startswith('list['):
- sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
+ if isinstance(klass, str):
+ if klass.startswith('List['):
+ m = re.match(r'List\[(.*)]', klass)
+ assert m is not None, "Malformed List type definition"
+ sub_kls = m.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)
+ if klass.startswith('Dict['):
+ m = re.match(r'Dict\[([^,]*), (.*)]', klass)
+ assert m is not None, "Malformed Dict type definition"
+ sub_kls = m.group(2)
return {k: self.__deserialize(v, sub_kls)
- for k, v in six.iteritems(data)}
+ for k, v in data.items()}
# convert str to class
if klass in self.NATIVE_TYPES_MAPPING:
@@ -266,131 +453,12 @@ class ApiClient(object):
elif klass == datetime.date:
return self.__deserialize_date(data)
elif klass == datetime.datetime:
- return self.__deserialize_datatime(data)
+ return self.__deserialize_datetime(data)
+ elif issubclass(klass, Enum):
+ return self.__deserialize_enum(data, klass)
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.
@@ -398,10 +466,10 @@ class ApiClient(object):
:param dict collection_formats: Parameter collection formats
:return: Parameters as list of tuples, collections formatted
"""
- new_params = []
+ new_params: List[Tuple[str, str]] = []
if collection_formats is None:
collection_formats = {}
- for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501
+ for k, v in params.items() if isinstance(params, dict) else params:
if k in collection_formats:
collection_format = collection_formats[k]
if collection_format == 'multi':
@@ -421,49 +489,85 @@ class ApiClient(object):
new_params.append((k, v))
return new_params
- def prepare_post_parameters(self, post_params=None, files=None):
+ def parameters_to_url_query(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: URL query string (e.g. a=Hello%20World&b=123)
+ """
+ new_params: List[Tuple[str, str]] = []
+ if collection_formats is None:
+ collection_formats = {}
+ for k, v in params.items() if isinstance(params, dict) else params:
+ if isinstance(v, bool):
+ v = str(v).lower()
+ if isinstance(v, (int, float)):
+ v = str(v)
+ if isinstance(v, dict):
+ v = json.dumps(v)
+
+ if k in collection_formats:
+ collection_format = collection_formats[k]
+ if collection_format == 'multi':
+ new_params.extend((k, str(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(quote(str(value)) for value in v))
+ )
+ else:
+ new_params.append((k, quote(str(v))))
+
+ return "&".join(["=".join(map(str, item)) for item in new_params])
+
+ def files_parameters(self, files: Dict[str, Union[str, bytes]]):
"""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])]))
-
+ for k, v in files.items():
+ if isinstance(v, str):
+ with open(v, 'rb') as f:
+ filename = os.path.basename(f.name)
+ filedata = f.read()
+ elif isinstance(v, bytes):
+ filename = k
+ filedata = v
+ else:
+ raise ValueError("Unsupported file value")
+ 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):
+ def select_header_accept(self, accepts: List[str]) -> Optional[str]:
"""Returns `Accept` based on an array of accepts provided.
:param accepts: List of headers.
:return: Accept (e.g. application/json).
"""
if not accepts:
- return
+ return None
- accepts = [x.lower() for x in accepts]
+ for accept in accepts:
+ if re.search('json', accept, re.IGNORECASE):
+ return accept
- if 'application/json' in accepts:
- return 'application/json'
- else:
- return ', '.join(accepts)
+ return accepts[0]
def select_header_content_type(self, content_types):
"""Returns `Content-Type` based on an array of content_types provided.
@@ -472,45 +576,101 @@ class ApiClient(object):
:return: Content-Type (e.g. application/json).
"""
if not content_types:
- return 'application/json'
+ return None
- content_types = [x.lower() for x in content_types]
+ for content_type in content_types:
+ if re.search('json', content_type, re.IGNORECASE):
+ return content_type
- if 'application/json' in content_types or '*/*' in content_types:
- return 'application/json'
- else:
- return content_types[0]
+ return content_types[0]
- def update_params_for_auth(self, headers, querys, auth_settings):
+ def update_params_for_auth(
+ self,
+ headers,
+ queries,
+ auth_settings,
+ resource_path,
+ method,
+ body,
+ request_auth=None
+ ) -> None:
"""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 queries: Query parameters tuple list to be updated.
:param auth_settings: Authentication setting identifiers list.
+ :resource_path: A string representation of the HTTP request resource path.
+ :method: A string representation of the HTTP request method.
+ :body: A object representing the body of the HTTP request.
+ The object type is the return value of sanitize_for_serialization().
+ :param request_auth: if set, the provided settings will
+ override the token in the configuration.
"""
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`'
+ if request_auth:
+ self._apply_auth_params(
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ request_auth
+ )
+ else:
+ for auth in auth_settings:
+ auth_setting = self.configuration.auth_settings().get(auth)
+ if auth_setting:
+ self._apply_auth_params(
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ auth_setting
)
+ def _apply_auth_params(
+ self,
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ auth_setting
+ ) -> None:
+ """Updates the request parameters based on a single auth_setting
+
+ :param headers: Header parameters dict to be updated.
+ :param queries: Query parameters tuple list to be updated.
+ :resource_path: A string representation of the HTTP request resource path.
+ :method: A string representation of the HTTP request method.
+ :body: A object representing the body of the HTTP request.
+ The object type is the return value of sanitize_for_serialization().
+ :param auth_setting: auth settings for the endpoint
+ """
+ if auth_setting['in'] == 'cookie':
+ headers['Cookie'] = auth_setting['value']
+ elif auth_setting['in'] == 'header':
+ if auth_setting['type'] != 'http-signature':
+ headers[auth_setting['key']] = auth_setting['value']
+ elif auth_setting['in'] == 'query':
+ queries.append((auth_setting['key'], auth_setting['value']))
+ else:
+ raise ApiValueError(
+ '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.
+ handle file downloading
+ save response body into a tmp file and return the instance
+
:param response: RESTResponse.
:return: file path.
"""
@@ -520,17 +680,17 @@ class ApiClient(object):
content_disposition = response.getheader("Content-Disposition")
if content_disposition:
- filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
- content_disposition).group(1)
+ m = re.search(
+ r'filename=[\'"]?([^\'"\s]+)[\'"]?',
+ content_disposition
+ )
+ assert m is not None, "Unexpected 'content-disposition' header value"
+ filename = m.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)
+
+ with open(path, "wb") as f:
+ f.write(response.data)
+
return path
def __deserialize_primitive(self, data, klass):
@@ -544,12 +704,12 @@ class ApiClient(object):
try:
return klass(data)
except UnicodeEncodeError:
- return six.text_type(data)
+ return str(data)
except TypeError:
return data
def __deserialize_object(self, value):
- """Return a original value.
+ """Return an original value.
:return: object.
"""
@@ -562,7 +722,6 @@ class ApiClient(object):
:return: date.
"""
try:
- from dateutil.parser import parse
return parse(string).date()
except ImportError:
return string
@@ -572,7 +731,7 @@ class ApiClient(object):
reason="Failed to parse `{0}` as date object".format(string)
)
- def __deserialize_datatime(self, string):
+ def __deserialize_datetime(self, string):
"""Deserializes string to datetime.
The string should be in iso8601 datetime format.
@@ -581,7 +740,6 @@ class ApiClient(object):
:return: datetime.
"""
try:
- from dateutil.parser import parse
return parse(string)
except ImportError:
return string
@@ -594,8 +752,23 @@ class ApiClient(object):
)
)
- def __hasattr(self, object, name):
- return name in object.__class__.__dict__
+ def __deserialize_enum(self, data, klass):
+ """Deserializes primitive type to enum.
+
+ :param data: primitive type.
+ :param klass: class literal.
+ :return: enum value.
+ """
+ try:
+ return klass(data)
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason=(
+ "Failed to parse `{0}` as `{1}`"
+ .format(data, klass)
+ )
+ )
def __deserialize_model(self, data, klass):
"""Deserializes list or dict to model.
@@ -605,28 +778,4 @@ class ApiClient(object):
: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
+ return klass.from_dict(data)
diff --git a/sdk/python/sdk/zrok/zrok_api/api_response.py b/sdk/python/sdk/zrok/zrok_api/api_response.py
new file mode 100644
index 00000000..9bc7c11f
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/api_response.py
@@ -0,0 +1,21 @@
+"""API response object."""
+
+from __future__ import annotations
+from typing import Optional, Generic, Mapping, TypeVar
+from pydantic import Field, StrictInt, StrictBytes, BaseModel
+
+T = TypeVar("T")
+
+class ApiResponse(BaseModel, Generic[T]):
+ """
+ API response object
+ """
+
+ status_code: StrictInt = Field(description="HTTP status code")
+ headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers")
+ data: T = Field(description="Deserialized data given the data type")
+ raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
+
+ model_config = {
+ "arbitrary_types_allowed": True
+ }
diff --git a/sdk/python/sdk/zrok/zrok_api/configuration.py b/sdk/python/sdk/zrok/zrok_api/configuration.py
index 331c27b7..868ba242 100644
--- a/sdk/python/sdk/zrok/zrok_api/configuration.py
+++ b/sdk/python/sdk/zrok/zrok_api/configuration.py
@@ -3,103 +3,272 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- OpenAPI spec version: 1.0.0
-
- Generated by: https://github.com/swagger-api/swagger-codegen.git
-"""
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import copy
import logging
+from logging import FileHandler
import multiprocessing
import sys
+from typing import Optional
import urllib3
-import six
-from six.moves import http_client as httplib
+import http.client as httplib
+JSON_SCHEMA_VALIDATION_KEYWORDS = {
+ 'multipleOf', 'maximum', 'exclusiveMaximum',
+ 'minimum', 'exclusiveMinimum', 'maxLength',
+ 'minLength', 'pattern', 'maxItems', 'minItems'
+}
-class TypeWithDefault(type):
- def __init__(cls, name, bases, dct):
- super(TypeWithDefault, cls).__init__(name, bases, dct)
- cls._default = None
+class Configuration:
+ """This class contains various settings of the API client.
- def __call__(cls):
- if cls._default is None:
- cls._default = type.__call__(cls)
- return copy.copy(cls._default)
+ :param host: Base url.
+ :param ignore_operation_servers
+ Boolean to ignore operation servers for the API client.
+ Config will use `host` as the base url regardless of the operation servers.
+ :param api_key: Dict to store API key(s).
+ Each entry in the dict specifies an API key.
+ The dict key is the name of the security scheme in the OAS specification.
+ The dict value is the API key secret.
+ :param api_key_prefix: Dict to store API prefix (e.g. Bearer).
+ The dict key is the name of the security scheme in the OAS specification.
+ The dict value is an API key prefix when generating the auth data.
+ :param username: Username for HTTP basic authentication.
+ :param password: Password for HTTP basic authentication.
+ :param access_token: Access token.
+ :param server_index: Index to servers configuration.
+ :param server_variables: Mapping with string values to replace variables in
+ templated server configuration. The validation of enums is performed for
+ variables with defined enum values before.
+ :param server_operation_index: Mapping from operation ID to an index to server
+ configuration.
+ :param server_operation_variables: Mapping from operation ID to a mapping with
+ string values to replace variables in templated server configuration.
+ The validation of enums is performed for variables with defined enum
+ values before.
+ :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
+ in PEM format.
+ :param retries: Number of retries for API requests.
- def set_default(cls, default):
- cls._default = copy.copy(default)
+ :Example:
+ API Key Authentication Example.
+ Given the following security scheme in the OpenAPI specification:
+ components:
+ securitySchemes:
+ cookieAuth: # name for the security scheme
+ type: apiKey
+ in: cookie
+ name: JSESSIONID # cookie name
-class Configuration(six.with_metaclass(TypeWithDefault, object)):
- """NOTE: This class is auto generated by the swagger code generator program.
+ You can programmatically set the cookie:
- Ref: https://github.com/swagger-api/swagger-codegen
- Do not edit the class manually.
+conf = zrok_api.Configuration(
+ api_key={'cookieAuth': 'abc123'}
+ api_key_prefix={'cookieAuth': 'JSESSIONID'}
+)
+
+ The following cookie will be added to the HTTP request:
+ Cookie: JSESSIONID abc123
"""
- def __init__(self):
- """Constructor"""
- # Default Base url
- self.host = "/api/v1"
- # Temp file folder for downloading files
- self.temp_folder_path = None
+ _default = None
+ def __init__(self, host=None,
+ api_key=None, api_key_prefix=None,
+ username=None, password=None,
+ access_token=None,
+ server_index=None, server_variables=None,
+ server_operation_index=None, server_operation_variables=None,
+ ignore_operation_servers=False,
+ ssl_ca_cert=None,
+ retries=None,
+ *,
+ debug: Optional[bool] = None
+ ) -> None:
+ """Constructor
+ """
+ self._base_path = "/api/v1" if host is None else host
+ """Default Base url
+ """
+ self.server_index = 0 if server_index is None and host is None else server_index
+ self.server_operation_index = server_operation_index or {}
+ """Default server index
+ """
+ self.server_variables = server_variables or {}
+ self.server_operation_variables = server_operation_variables or {}
+ """Default server variables
+ """
+ self.ignore_operation_servers = ignore_operation_servers
+ """Ignore operation servers
+ """
+ self.temp_folder_path = None
+ """Temp file folder for downloading files
+ """
# Authentication Settings
- # dict to store API key(s)
self.api_key = {}
- # dict to store API prefix (e.g. Bearer)
+ if api_key:
+ self.api_key = api_key
+ """dict to store API key(s)
+ """
self.api_key_prefix = {}
- # function to refresh API key if expired
+ if api_key_prefix:
+ self.api_key_prefix = api_key_prefix
+ """dict to store API prefix (e.g. Bearer)
+ """
self.refresh_api_key_hook = None
- # Username for HTTP basic authentication
- self.username = ""
- # Password for HTTP basic authentication
- self.password = ""
- # Logging Settings
+ """function hook to refresh API key if expired
+ """
+ self.username = username
+ """Username for HTTP basic authentication
+ """
+ self.password = password
+ """Password for HTTP basic authentication
+ """
+ self.access_token = access_token
+ """Access token
+ """
self.logger = {}
+ """Logging Settings
+ """
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
+ """Log format
+ """
self.logger_stream_handler = None
- # Log file handler
- self.logger_file_handler = None
- # Debug file location
+ """Log stream handler
+ """
+ self.logger_file_handler: Optional[FileHandler] = None
+ """Log file handler
+ """
self.logger_file = None
- # Debug switch
- self.debug = False
+ """Debug file location
+ """
+ if debug is not None:
+ self.debug = debug
+ else:
+ self.__debug = False
+ """Debug switch
+ """
- # 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
+ """SSL/TLS verification
+ Set this to false to skip verifying SSL certificate when calling API
+ from https server.
+ """
+ self.ssl_ca_cert = ssl_ca_cert
+ """Set this to customize the certificate file to verify the peer.
+ """
self.cert_file = None
- # client key file
+ """client certificate file
+ """
self.key_file = None
- # Set this to True/False to enable/disable SSL hostname verification.
+ """client key file
+ """
self.assert_hostname = None
+ """Set this to True/False to enable/disable SSL hostname verification.
+ """
+ self.tls_server_name = None
+ """SSL/TLS Server Name Indication (SNI)
+ Set this to the SNI value expected by the server.
+ """
- # 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
+ """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.
+ """
- # Proxy URL
- self.proxy = None
- # Safe chars for path_param
+ self.proxy: Optional[str] = None
+ """Proxy URL
+ """
+ self.proxy_headers = None
+ """Proxy headers
+ """
self.safe_chars_for_path_param = ''
+ """Safe chars for path_param
+ """
+ self.retries = retries
+ """Adding retries to override urllib3 default value 3
+ """
+ # Enable client side validation
+ self.client_side_validation = True
+
+ self.socket_options = None
+ """Options to pass down to the underlying urllib3 socket
+ """
+
+ self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z"
+ """datetime format
+ """
+
+ self.date_format = "%Y-%m-%d"
+ """date format
+ """
+
+ def __deepcopy__(self, memo):
+ cls = self.__class__
+ result = cls.__new__(cls)
+ memo[id(self)] = result
+ for k, v in self.__dict__.items():
+ if k not in ('logger', 'logger_file_handler'):
+ setattr(result, k, copy.deepcopy(v, memo))
+ # shallow copy of loggers
+ result.logger = copy.copy(self.logger)
+ # use setters to configure loggers
+ result.logger_file = self.logger_file
+ result.debug = self.debug
+ return result
+
+ def __setattr__(self, name, value):
+ object.__setattr__(self, name, value)
+
+ @classmethod
+ def set_default(cls, default):
+ """Set default instance of configuration.
+
+ It stores default configuration, which can be
+ returned by get_default_copy method.
+
+ :param default: object of Configuration
+ """
+ cls._default = default
+
+ @classmethod
+ def get_default_copy(cls):
+ """Deprecated. Please use `get_default` instead.
+
+ Deprecated. Please use `get_default` instead.
+
+ :return: The configuration object.
+ """
+ return cls.get_default()
+
+ @classmethod
+ def get_default(cls):
+ """Return the default configuration.
+
+ This method returns newly created, based on default constructor,
+ object of Configuration class or returns a copy of default
+ configuration.
+
+ :return: The configuration object.
+ """
+ if cls._default is None:
+ cls._default = Configuration()
+ return cls._default
@property
def logger_file(self):
@@ -129,19 +298,8 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
# 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):
+ for _, logger in self.logger.items():
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):
@@ -162,14 +320,14 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
self.__debug = value
if self.__debug:
# if debug status is True, turn on debug logging
- for _, logger in six.iteritems(self.logger):
+ for _, logger in self.logger.items():
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):
+ for _, logger in self.logger.items():
logger.setLevel(logging.WARNING)
# turn off httplib debug
httplib.HTTPConnection.debuglevel = 0
@@ -197,16 +355,16 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
self.__logger_format = value
self.logger_formatter = logging.Formatter(self.__logger_format)
- def get_api_key_with_prefix(self, identifier):
+ def get_api_key_with_prefix(self, identifier, alias=None):
"""Gets API key (with prefix if set).
:param identifier: The identifier of apiKey.
+ :param alias: The alternative identifier of apiKey.
:return: The token for api key authentication.
"""
- if self.refresh_api_key_hook:
+ if self.refresh_api_key_hook is not None:
self.refresh_api_key_hook(self)
-
- key = self.api_key.get(identifier)
+ key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
if key:
prefix = self.api_key_prefix.get(identifier)
if prefix:
@@ -219,8 +377,14 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
:return: The token for basic HTTP authentication.
"""
+ username = ""
+ if self.username is not None:
+ username = self.username
+ password = ""
+ if self.password is not None:
+ password = self.password
return urllib3.util.make_headers(
- basic_auth=self.username + ':' + self.password
+ basic_auth=username + ':' + password
).get('authorization')
def auth_settings(self):
@@ -228,15 +392,17 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
: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')
- },
- }
+ auth = {}
+ if 'key' in self.api_key:
+ auth['key'] = {
+ 'type': 'api_key',
+ 'in': 'header',
+ 'key': 'x-token',
+ 'value': self.get_api_key_with_prefix(
+ 'key',
+ ),
+ }
+ return auth
def to_debug_report(self):
"""Gets the essential information for debugging.
@@ -249,3 +415,65 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
"Version of the API: 1.0.0\n"\
"SDK Package Version: 1.0.0".\
format(env=sys.platform, pyversion=sys.version)
+
+ def get_host_settings(self):
+ """Gets an array of host settings
+
+ :return: An array of host settings
+ """
+ return [
+ {
+ 'url': "/api/v1",
+ 'description': "No description provided",
+ }
+ ]
+
+ def get_host_from_settings(self, index, variables=None, servers=None):
+ """Gets host URL based on the index and variables
+ :param index: array index of the host settings
+ :param variables: hash of variable and the corresponding value
+ :param servers: an array of host settings or None
+ :return: URL based on host settings
+ """
+ if index is None:
+ return self._base_path
+
+ variables = {} if variables is None else variables
+ servers = self.get_host_settings() if servers is None else servers
+
+ try:
+ server = servers[index]
+ except IndexError:
+ raise ValueError(
+ "Invalid index {0} when selecting the host settings. "
+ "Must be less than {1}".format(index, len(servers)))
+
+ url = server['url']
+
+ # go through variables and replace placeholders
+ for variable_name, variable in server.get('variables', {}).items():
+ used_value = variables.get(
+ variable_name, variable['default_value'])
+
+ if 'enum_values' in variable \
+ and used_value not in variable['enum_values']:
+ raise ValueError(
+ "The variable `{0}` in the host URL has invalid value "
+ "{1}. Must be {2}.".format(
+ variable_name, variables[variable_name],
+ variable['enum_values']))
+
+ url = url.replace("{" + variable_name + "}", used_value)
+
+ return url
+
+ @property
+ def host(self):
+ """Return generated host."""
+ return self.get_host_from_settings(self.server_index, variables=self.server_variables)
+
+ @host.setter
+ def host(self, value):
+ """Fix base path."""
+ self._base_path = value
+ self.server_index = None
diff --git a/sdk/python/sdk/zrok/zrok_api/exceptions.py b/sdk/python/sdk/zrok/zrok_api/exceptions.py
new file mode 100644
index 00000000..999f4d6c
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/exceptions.py
@@ -0,0 +1,199 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from typing import Any, Optional
+from typing_extensions import Self
+
+class OpenApiException(Exception):
+ """The base exception class for all OpenAPIExceptions"""
+
+
+class ApiTypeError(OpenApiException, TypeError):
+ def __init__(self, msg, path_to_item=None, valid_classes=None,
+ key_type=None) -> None:
+ """ Raises an exception for TypeErrors
+
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (list): a list of keys an indices to get to the
+ current_item
+ None if unset
+ valid_classes (tuple): the primitive classes that current item
+ should be an instance of
+ None if unset
+ key_type (bool): False if our value is a value in a dict
+ True if it is a key in a dict
+ False if our item is an item in a list
+ None if unset
+ """
+ self.path_to_item = path_to_item
+ self.valid_classes = valid_classes
+ self.key_type = key_type
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiTypeError, self).__init__(full_msg)
+
+
+class ApiValueError(OpenApiException, ValueError):
+ def __init__(self, msg, path_to_item=None) -> None:
+ """
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (list) the path to the exception in the
+ received_data dict. None if unset
+ """
+
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiValueError, self).__init__(full_msg)
+
+
+class ApiAttributeError(OpenApiException, AttributeError):
+ def __init__(self, msg, path_to_item=None) -> None:
+ """
+ Raised when an attribute reference or assignment fails.
+
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (None/list) the path to the exception in the
+ received_data dict
+ """
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiAttributeError, self).__init__(full_msg)
+
+
+class ApiKeyError(OpenApiException, KeyError):
+ def __init__(self, msg, path_to_item=None) -> None:
+ """
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (None/list) the path to the exception in the
+ received_data dict
+ """
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiKeyError, self).__init__(full_msg)
+
+
+class ApiException(OpenApiException):
+
+ def __init__(
+ self,
+ status=None,
+ reason=None,
+ http_resp=None,
+ *,
+ body: Optional[str] = None,
+ data: Optional[Any] = None,
+ ) -> None:
+ self.status = status
+ self.reason = reason
+ self.body = body
+ self.data = data
+ self.headers = None
+
+ if http_resp:
+ if self.status is None:
+ self.status = http_resp.status
+ if self.reason is None:
+ self.reason = http_resp.reason
+ if self.body is None:
+ try:
+ self.body = http_resp.data.decode('utf-8')
+ except Exception:
+ pass
+ self.headers = http_resp.getheaders()
+
+ @classmethod
+ def from_response(
+ cls,
+ *,
+ http_resp,
+ body: Optional[str],
+ data: Optional[Any],
+ ) -> Self:
+ if http_resp.status == 400:
+ raise BadRequestException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 401:
+ raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 403:
+ raise ForbiddenException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 404:
+ raise NotFoundException(http_resp=http_resp, body=body, data=data)
+
+ if 500 <= http_resp.status <= 599:
+ raise ServiceException(http_resp=http_resp, body=body, data=data)
+ raise ApiException(http_resp=http_resp, body=body, data=data)
+
+ 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.data or self.body:
+ error_message += "HTTP response body: {0}\n".format(self.data or self.body)
+
+ return error_message
+
+
+class BadRequestException(ApiException):
+ pass
+
+
+class NotFoundException(ApiException):
+ pass
+
+
+class UnauthorizedException(ApiException):
+ pass
+
+
+class ForbiddenException(ApiException):
+ pass
+
+
+class ServiceException(ApiException):
+ pass
+
+
+def render_path(path_to_item):
+ """Returns a string representation of a path"""
+ result = ""
+ for pth in path_to_item:
+ if isinstance(pth, int):
+ result += "[{0}]".format(pth)
+ else:
+ result += "['{0}']".format(pth)
+ return result
diff --git a/sdk/python/sdk/zrok/zrok_api/models/__init__.py b/sdk/python/sdk/zrok/zrok_api/models/__init__.py
index c59710d3..c4f5e3c4 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/__init__.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/__init__.py
@@ -4,76 +4,64 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- OpenAPI spec version: 1.0.0
-
- Generated by: https://github.com/swagger-api/swagger-codegen.git
-"""
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
-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.access201_response import Access201Response
+from zrok_api.models.access_request import AccessRequest
+from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest
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.change_password_request import ChangePasswordRequest
+from zrok_api.models.client_version_check_request import ClientVersionCheckRequest
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.create_frontend201_response import CreateFrontend201Response
+from zrok_api.models.create_frontend_request import CreateFrontendRequest
+from zrok_api.models.create_identity201_response import CreateIdentity201Response
+from zrok_api.models.create_identity_request import CreateIdentityRequest
+from zrok_api.models.create_organization201_response import CreateOrganization201Response
+from zrok_api.models.create_organization_request import CreateOrganizationRequest
+from zrok_api.models.disable_request import DisableRequest
+from zrok_api.models.enable_request import EnableRequest
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.get_sparklines200_response import GetSparklines200Response
+from zrok_api.models.get_sparklines_request import GetSparklinesRequest
+from zrok_api.models.invite_request import InviteRequest
+from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
+from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner
+from zrok_api.models.list_memberships200_response import ListMemberships200Response
+from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner
+from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response
+from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner
+from zrok_api.models.list_organizations200_response import ListOrganizations200Response
+from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
+from zrok_api.models.login_request import LoginRequest
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.regenerate_account_token200_response import RegenerateAccountToken200Response
+from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest
+from zrok_api.models.register_request import RegisterRequest
+from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest
+from zrok_api.models.reset_password_request import ResetPasswordRequest
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
+from zrok_api.models.unaccess_request import UnaccessRequest
+from zrok_api.models.unshare_request import UnshareRequest
+from zrok_api.models.update_access_request import UpdateAccessRequest
+from zrok_api.models.update_frontend_request import UpdateFrontendRequest
+from zrok_api.models.update_share_request import UpdateShareRequest
+from zrok_api.models.verify200_response import Verify200Response
+from zrok_api.models.verify_request import VerifyRequest
+from zrok_api.models.version_inventory200_response import VersionInventory200Response
diff --git a/sdk/python/sdk/zrok/zrok_api/models/access201_response.py b/sdk/python/sdk/zrok/zrok_api/models/access201_response.py
new file mode 100644
index 00000000..6058082c
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/access201_response.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Access201Response(BaseModel):
+ """
+ Access201Response
+ """ # noqa: E501
+ frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken")
+ backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode")
+ __properties: ClassVar[List[str]] = ["frontendToken", "backendMode"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Access201Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Access201Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "frontendToken": obj.get("frontendToken"),
+ "backendMode": obj.get("backendMode")
+ })
+ return _obj
+
+
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/access_request.py b/sdk/python/sdk/zrok/zrok_api/models/access_request.py
new file mode 100644
index 00000000..18eb9837
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/access_request.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AccessRequest(BaseModel):
+ """
+ AccessRequest
+ """ # noqa: E501
+ env_zid: Optional[StrictStr] = Field(default=None, alias="envZId")
+ share_token: Optional[StrictStr] = Field(default=None, alias="shareToken")
+ bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress")
+ description: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["envZId", "shareToken", "bindAddress", "description"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AccessRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AccessRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "envZId": obj.get("envZId"),
+ "shareToken": obj.get("shareToken"),
+ "bindAddress": obj.get("bindAddress"),
+ "description": obj.get("description")
+ })
+ return _obj
+
+
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/add_organization_member_request.py b/sdk/python/sdk/zrok/zrok_api/models/add_organization_member_request.py
new file mode 100644
index 00000000..d6db9e38
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/add_organization_member_request.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AddOrganizationMemberRequest(BaseModel):
+ """
+ AddOrganizationMemberRequest
+ """ # noqa: E501
+ organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken")
+ email: Optional[StrictStr] = None
+ admin: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["organizationToken", "email", "admin"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AddOrganizationMemberRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AddOrganizationMemberRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "organizationToken": obj.get("organizationToken"),
+ "email": obj.get("email"),
+ "admin": obj.get("admin")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py b/sdk/python/sdk/zrok/zrok_api/models/auth_user.py
index 0a04dc10..b8e1718d 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/auth_user.py
@@ -3,134 +3,87 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AuthUser(BaseModel):
"""
- """
- 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'
- }
+ AuthUser
+ """ # noqa: E501
+ username: Optional[StrictStr] = None
+ password: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["username", "password"]
- 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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The username of this AuthUser. # noqa: E501
- :rtype: str
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of AuthUser from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._username
+ excluded_fields: Set[str] = set([
+ ])
- @username.setter
- def username(self, username):
- """Sets the username of this AuthUser.
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of AuthUser from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "username": obj.get("username"),
+ "password": obj.get("password")
+ })
+ return _obj
- :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/change_password_request.py b/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py
new file mode 100644
index 00000000..dcbdafb3
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ChangePasswordRequest(BaseModel):
+ """
+ ChangePasswordRequest
+ """ # noqa: E501
+ email: Optional[StrictStr] = None
+ old_password: Optional[StrictStr] = Field(default=None, alias="oldPassword")
+ new_password: Optional[StrictStr] = Field(default=None, alias="newPassword")
+ __properties: ClassVar[List[str]] = ["email", "oldPassword", "newPassword"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ChangePasswordRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ChangePasswordRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "oldPassword": obj.get("oldPassword"),
+ "newPassword": obj.get("newPassword")
+ })
+ return _obj
+
+
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/client_version_check_request.py b/sdk/python/sdk/zrok/zrok_api/models/client_version_check_request.py
new file mode 100644
index 00000000..813e57ac
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/client_version_check_request.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ClientVersionCheckRequest(BaseModel):
+ """
+ ClientVersionCheckRequest
+ """ # noqa: E501
+ client_version: Optional[StrictStr] = Field(default=None, alias="clientVersion")
+ __properties: ClassVar[List[str]] = ["clientVersion"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ClientVersionCheckRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ClientVersionCheckRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "clientVersion": obj.get("clientVersion")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/configuration.py b/sdk/python/sdk/zrok/zrok_api/models/configuration.py
index 6f1f70b5..ed5ece38 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/configuration.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/configuration.py
@@ -3,212 +3,93 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Configuration(BaseModel):
"""
- """
- 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'
- }
+ Configuration
+ """ # noqa: E501
+ version: Optional[StrictStr] = None
+ tou_link: Optional[StrictStr] = Field(default=None, alias="touLink")
+ invites_open: Optional[StrictBool] = Field(default=None, alias="invitesOpen")
+ requires_invite_token: Optional[StrictBool] = Field(default=None, alias="requiresInviteToken")
+ invite_token_contact: Optional[StrictStr] = Field(default=None, alias="inviteTokenContact")
+ __properties: ClassVar[List[str]] = ["version", "touLink", "invitesOpen", "requiresInviteToken", "inviteTokenContact"]
- 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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The version of this Configuration. # noqa: E501
- :rtype: str
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Configuration from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._version
+ excluded_fields: Set[str] = set([
+ ])
- @version.setter
- def version(self, version):
- """Sets the version of this Configuration.
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Configuration from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "version": obj.get("version"),
+ "touLink": obj.get("touLink"),
+ "invitesOpen": obj.get("invitesOpen"),
+ "requiresInviteToken": obj.get("requiresInviteToken"),
+ "inviteTokenContact": obj.get("inviteTokenContact")
+ })
+ return _obj
- :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/create_frontend201_response.py b/sdk/python/sdk/zrok/zrok_api/models/create_frontend201_response.py
new file mode 100644
index 00000000..61fc364c
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/create_frontend201_response.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateFrontend201Response(BaseModel):
+ """
+ CreateFrontend201Response
+ """ # noqa: E501
+ frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken")
+ __properties: ClassVar[List[str]] = ["frontendToken"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateFrontend201Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateFrontend201Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "frontendToken": obj.get("frontendToken")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py b/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py
new file mode 100644
index 00000000..5f7072e8
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateFrontendRequest(BaseModel):
+ """
+ CreateFrontendRequest
+ """ # noqa: E501
+ z_id: Optional[StrictStr] = Field(default=None, alias="zId")
+ url_template: Optional[StrictStr] = None
+ public_name: Optional[StrictStr] = None
+ permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode")
+ __properties: ClassVar[List[str]] = ["zId", "url_template", "public_name", "permissionMode"]
+
+ @field_validator('permission_mode')
+ def permission_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['open', 'closed']):
+ raise ValueError("must be one of enum values ('open', 'closed')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateFrontendRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateFrontendRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "zId": obj.get("zId"),
+ "url_template": obj.get("url_template"),
+ "public_name": obj.get("public_name"),
+ "permissionMode": obj.get("permissionMode")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_identity201_response.py b/sdk/python/sdk/zrok/zrok_api/models/create_identity201_response.py
new file mode 100644
index 00000000..f2811bbf
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/create_identity201_response.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateIdentity201Response(BaseModel):
+ """
+ CreateIdentity201Response
+ """ # noqa: E501
+ identity: Optional[StrictStr] = None
+ cfg: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["identity", "cfg"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateIdentity201Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateIdentity201Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "identity": obj.get("identity"),
+ "cfg": obj.get("cfg")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_identity_request.py b/sdk/python/sdk/zrok/zrok_api/models/create_identity_request.py
new file mode 100644
index 00000000..9f21d0a8
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/create_identity_request.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateIdentityRequest(BaseModel):
+ """
+ CreateIdentityRequest
+ """ # noqa: E501
+ name: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["name"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateIdentityRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateIdentityRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_organization201_response.py b/sdk/python/sdk/zrok/zrok_api/models/create_organization201_response.py
new file mode 100644
index 00000000..431bf57a
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/create_organization201_response.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateOrganization201Response(BaseModel):
+ """
+ CreateOrganization201Response
+ """ # noqa: E501
+ organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken")
+ __properties: ClassVar[List[str]] = ["organizationToken"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateOrganization201Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateOrganization201Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "organizationToken": obj.get("organizationToken")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_organization_request.py b/sdk/python/sdk/zrok/zrok_api/models/create_organization_request.py
new file mode 100644
index 00000000..de5d6572
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/create_organization_request.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateOrganizationRequest(BaseModel):
+ """
+ CreateOrganizationRequest
+ """ # noqa: E501
+ description: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["description"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CreateOrganizationRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CreateOrganizationRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "description": obj.get("description")
+ })
+ return _obj
+
+
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/disable_request.py b/sdk/python/sdk/zrok/zrok_api/models/disable_request.py
new file mode 100644
index 00000000..a6c30a01
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/disable_request.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class DisableRequest(BaseModel):
+ """
+ DisableRequest
+ """ # noqa: E501
+ identity: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["identity"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of DisableRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of DisableRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "identity": obj.get("identity")
+ })
+ return _obj
+
+
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/enable_request.py b/sdk/python/sdk/zrok/zrok_api/models/enable_request.py
new file mode 100644
index 00000000..ad54886c
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/enable_request.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class EnableRequest(BaseModel):
+ """
+ EnableRequest
+ """ # noqa: E501
+ description: Optional[StrictStr] = None
+ host: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["description", "host"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EnableRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EnableRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "description": obj.get("description"),
+ "host": obj.get("host")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment.py b/sdk/python/sdk/zrok/zrok_api/models/environment.py
index 53c85559..7f6bd2f7 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/environment.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/environment.py
@@ -3,290 +3,107 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from zrok_api.models.spark_data_sample import SparkDataSample
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Environment(BaseModel):
"""
- """
- 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'
- }
+ Environment
+ """ # noqa: E501
+ description: Optional[StrictStr] = None
+ host: Optional[StrictStr] = None
+ address: Optional[StrictStr] = None
+ z_id: Optional[StrictStr] = Field(default=None, alias="zId")
+ activity: Optional[List[SparkDataSample]] = None
+ limited: Optional[StrictBool] = None
+ created_at: Optional[StrictInt] = Field(default=None, alias="createdAt")
+ updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt")
+ __properties: ClassVar[List[str]] = ["description", "host", "address", "zId", "activity", "limited", "createdAt", "updatedAt"]
- 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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The description of this Environment. # noqa: E501
- :rtype: str
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Environment from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._description
+ excluded_fields: Set[str] = set([
+ ])
- @description.setter
- def description(self, description):
- """Sets the description of this Environment.
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in activity (list)
+ _items = []
+ if self.activity:
+ for _item in self.activity:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['activity'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Environment from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "description": obj.get("description"),
+ "host": obj.get("host"),
+ "address": obj.get("address"),
+ "zId": obj.get("zId"),
+ "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None,
+ "limited": obj.get("limited"),
+ "createdAt": obj.get("createdAt"),
+ "updatedAt": obj.get("updatedAt")
+ })
+ return _obj
- :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
index 12c466bb..9c1608fe 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py
@@ -3,160 +3,109 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from zrok_api.models.environment import Environment
+from zrok_api.models.frontend import Frontend
+from zrok_api.models.share import Share
+from typing import Optional, Set
+from typing_extensions import Self
+
+class EnvironmentAndResources(BaseModel):
"""
- """
- 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'
- }
+ EnvironmentAndResources
+ """ # noqa: E501
+ environment: Optional[Environment] = None
+ frontends: Optional[List[Frontend]] = None
+ shares: Optional[List[Share]] = None
+ __properties: ClassVar[List[str]] = ["environment", "frontends", "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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The environment of this EnvironmentAndResources. # noqa: E501
- :rtype: Environment
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EnvironmentAndResources from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._environment
+ excluded_fields: Set[str] = set([
+ ])
- @environment.setter
- def environment(self, environment):
- """Sets the environment of this EnvironmentAndResources.
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of environment
+ if self.environment:
+ _dict['environment'] = self.environment.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in frontends (list)
+ _items = []
+ if self.frontends:
+ for _item in self.frontends:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['frontends'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in shares (list)
+ _items = []
+ if self.shares:
+ for _item in self.shares:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['shares'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EnvironmentAndResources from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "environment": Environment.from_dict(obj["environment"]) if obj.get("environment") is not None else None,
+ "frontends": [Frontend.from_dict(_item) for _item in obj["frontends"]] if obj.get("frontends") is not None else None,
+ "shares": [Share.from_dict(_item) for _item in obj["shares"]] if obj.get("shares") is not None else None
+ })
+ return _obj
- :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
index 46cf93eb..ae3c4c5d 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/frontend.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/frontend.py
@@ -3,316 +3,101 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Frontend(BaseModel):
"""
- """
- 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'
- }
+ Frontend
+ """ # noqa: E501
+ id: Optional[StrictInt] = None
+ frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken")
+ share_token: Optional[StrictStr] = Field(default=None, alias="shareToken")
+ backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode")
+ bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress")
+ description: Optional[StrictStr] = None
+ z_id: Optional[StrictStr] = Field(default=None, alias="zId")
+ created_at: Optional[StrictInt] = Field(default=None, alias="createdAt")
+ updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt")
+ __properties: ClassVar[List[str]] = ["id", "frontendToken", "shareToken", "backendMode", "bindAddress", "description", "zId", "createdAt", "updatedAt"]
- 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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The id of this Frontend. # noqa: E501
- :rtype: int
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Frontend from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._id
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Frontend from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "frontendToken": obj.get("frontendToken"),
+ "shareToken": obj.get("shareToken"),
+ "backendMode": obj.get("backendMode"),
+ "bindAddress": obj.get("bindAddress"),
+ "description": obj.get("description"),
+ "zId": obj.get("zId"),
+ "createdAt": obj.get("createdAt"),
+ "updatedAt": obj.get("updatedAt")
+ })
+ return _obj
- @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/get_sparklines200_response.py b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py
new file mode 100644
index 00000000..e2847c98
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from zrok_api.models.metrics import Metrics
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GetSparklines200Response(BaseModel):
+ """
+ GetSparklines200Response
+ """ # noqa: E501
+ sparklines: Optional[List[Metrics]] = None
+ __properties: ClassVar[List[str]] = ["sparklines"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GetSparklines200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in sparklines (list)
+ _items = []
+ if self.sparklines:
+ for _item in self.sparklines:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['sparklines'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GetSparklines200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "sparklines": [Metrics.from_dict(_item) for _item in obj["sparklines"]] if obj.get("sparklines") is not None else None
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/get_sparklines_request.py b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines_request.py
new file mode 100644
index 00000000..d9bef43d
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines_request.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GetSparklinesRequest(BaseModel):
+ """
+ GetSparklinesRequest
+ """ # noqa: E501
+ account: Optional[StrictBool] = None
+ environments: Optional[List[StrictStr]] = None
+ shares: Optional[List[StrictStr]] = None
+ __properties: ClassVar[List[str]] = ["account", "environments", "shares"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of GetSparklinesRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GetSparklinesRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "account": obj.get("account"),
+ "environments": obj.get("environments"),
+ "shares": obj.get("shares")
+ })
+ return _obj
+
+
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/invite_request.py b/sdk/python/sdk/zrok/zrok_api/models/invite_request.py
new file mode 100644
index 00000000..1c5bcc76
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/invite_request.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InviteRequest(BaseModel):
+ """
+ InviteRequest
+ """ # noqa: E501
+ email: Optional[StrictStr] = None
+ invite_token: Optional[StrictStr] = Field(default=None, alias="inviteToken")
+ __properties: ClassVar[List[str]] = ["email", "inviteToken"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InviteRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InviteRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "inviteToken": obj.get("inviteToken")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py b/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py
new file mode 100644
index 00000000..dd876de6
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class InviteTokenGenerateRequest(BaseModel):
+ """
+ InviteTokenGenerateRequest
+ """ # noqa: E501
+ invite_tokens: Optional[List[StrictStr]] = Field(default=None, alias="inviteTokens")
+ __properties: ClassVar[List[str]] = ["inviteTokens"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of InviteTokenGenerateRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of InviteTokenGenerateRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "inviteTokens": obj.get("inviteTokens")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_frontends200_response_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_frontends200_response_inner.py
new file mode 100644
index 00000000..ff9d1bb4
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/list_frontends200_response_inner.py
@@ -0,0 +1,97 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ListFrontends200ResponseInner(BaseModel):
+ """
+ ListFrontends200ResponseInner
+ """ # noqa: E501
+ frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken")
+ z_id: Optional[StrictStr] = Field(default=None, alias="zId")
+ url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate")
+ public_name: Optional[StrictStr] = Field(default=None, alias="publicName")
+ created_at: Optional[StrictInt] = Field(default=None, alias="createdAt")
+ updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt")
+ __properties: ClassVar[List[str]] = ["frontendToken", "zId", "urlTemplate", "publicName", "createdAt", "updatedAt"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ListFrontends200ResponseInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ListFrontends200ResponseInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "frontendToken": obj.get("frontendToken"),
+ "zId": obj.get("zId"),
+ "urlTemplate": obj.get("urlTemplate"),
+ "publicName": obj.get("publicName"),
+ "createdAt": obj.get("createdAt"),
+ "updatedAt": obj.get("updatedAt")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py
new file mode 100644
index 00000000..cef5e9f1
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ListMemberships200Response(BaseModel):
+ """
+ ListMemberships200Response
+ """ # noqa: E501
+ memberships: Optional[List[ListMemberships200ResponseMembershipsInner]] = None
+ __properties: ClassVar[List[str]] = ["memberships"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ListMemberships200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in memberships (list)
+ _items = []
+ if self.memberships:
+ for _item in self.memberships:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['memberships'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ListMemberships200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "memberships": [ListMemberships200ResponseMembershipsInner.from_dict(_item) for _item in obj["memberships"]] if obj.get("memberships") is not None else None
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response_memberships_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response_memberships_inner.py
new file mode 100644
index 00000000..e39b07b8
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response_memberships_inner.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ListMemberships200ResponseMembershipsInner(BaseModel):
+ """
+ ListMemberships200ResponseMembershipsInner
+ """ # noqa: E501
+ organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken")
+ description: Optional[StrictStr] = None
+ admin: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["organizationToken", "description", "admin"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ListMemberships200ResponseMembershipsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ListMemberships200ResponseMembershipsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "organizationToken": obj.get("organizationToken"),
+ "description": obj.get("description"),
+ "admin": obj.get("admin")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py
new file mode 100644
index 00000000..c233d717
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ListOrganizationMembers200Response(BaseModel):
+ """
+ ListOrganizationMembers200Response
+ """ # noqa: E501
+ members: Optional[List[ListOrganizationMembers200ResponseMembersInner]] = None
+ __properties: ClassVar[List[str]] = ["members"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ListOrganizationMembers200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in members (list)
+ _items = []
+ if self.members:
+ for _item in self.members:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['members'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ListOrganizationMembers200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "members": [ListOrganizationMembers200ResponseMembersInner.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response_members_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response_members_inner.py
new file mode 100644
index 00000000..0266e878
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response_members_inner.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ListOrganizationMembers200ResponseMembersInner(BaseModel):
+ """
+ ListOrganizationMembers200ResponseMembersInner
+ """ # noqa: E501
+ email: Optional[StrictStr] = None
+ admin: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["email", "admin"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ListOrganizationMembers200ResponseMembersInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ListOrganizationMembers200ResponseMembersInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "admin": obj.get("admin")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py
new file mode 100644
index 00000000..34b9a19c
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ListOrganizations200Response(BaseModel):
+ """
+ ListOrganizations200Response
+ """ # noqa: E501
+ organizations: Optional[List[ListOrganizations200ResponseOrganizationsInner]] = None
+ __properties: ClassVar[List[str]] = ["organizations"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ListOrganizations200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in organizations (list)
+ _items = []
+ if self.organizations:
+ for _item in self.organizations:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['organizations'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ListOrganizations200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "organizations": [ListOrganizations200ResponseOrganizationsInner.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response_organizations_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response_organizations_inner.py
new file mode 100644
index 00000000..463e142a
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response_organizations_inner.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ListOrganizations200ResponseOrganizationsInner(BaseModel):
+ """
+ ListOrganizations200ResponseOrganizationsInner
+ """ # noqa: E501
+ organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken")
+ description: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["organizationToken", "description"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ListOrganizations200ResponseOrganizationsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ListOrganizations200ResponseOrganizationsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "organizationToken": obj.get("organizationToken"),
+ "description": obj.get("description")
+ })
+ return _obj
+
+
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/login_request.py b/sdk/python/sdk/zrok/zrok_api/models/login_request.py
new file mode 100644
index 00000000..6ef640ea
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/login_request.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class LoginRequest(BaseModel):
+ """
+ LoginRequest
+ """ # noqa: E501
+ email: Optional[StrictStr] = None
+ password: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["email", "password"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of LoginRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of LoginRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "password": obj.get("password")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics.py b/sdk/python/sdk/zrok/zrok_api/models/metrics.py
index d7dd52f8..c3d91c23 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/metrics.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/metrics.py
@@ -3,186 +3,99 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from zrok_api.models.metrics_sample import MetricsSample
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Metrics(BaseModel):
"""
- """
- 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]'
- }
+ Metrics
+ """ # noqa: E501
+ scope: Optional[StrictStr] = None
+ id: Optional[StrictStr] = None
+ period: Optional[Union[StrictFloat, StrictInt]] = None
+ samples: Optional[List[MetricsSample]] = None
+ __properties: ClassVar[List[str]] = ["scope", "id", "period", "samples"]
- 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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The scope of this Metrics. # noqa: E501
- :rtype: str
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Metrics from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._scope
+ excluded_fields: Set[str] = set([
+ ])
- @scope.setter
- def scope(self, scope):
- """Sets the scope of this Metrics.
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in samples (list)
+ _items = []
+ if self.samples:
+ for _item in self.samples:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['samples'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Metrics from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "scope": obj.get("scope"),
+ "id": obj.get("id"),
+ "period": obj.get("period"),
+ "samples": [MetricsSample.from_dict(_item) for _item in obj["samples"]] if obj.get("samples") is not None else None
+ })
+ return _obj
- :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
index 8e297c43..678d0c1e 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py
@@ -3,160 +3,89 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing import Optional, Set
+from typing_extensions import Self
+
+class MetricsSample(BaseModel):
"""
- """
- 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'
- }
+ MetricsSample
+ """ # noqa: E501
+ rx: Optional[Union[StrictFloat, StrictInt]] = None
+ tx: Optional[Union[StrictFloat, StrictInt]] = None
+ timestamp: Optional[Union[StrictFloat, StrictInt]] = None
+ __properties: ClassVar[List[str]] = ["rx", "tx", "timestamp"]
- 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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The rx of this MetricsSample. # noqa: E501
- :rtype: float
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of MetricsSample from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._rx
+ excluded_fields: Set[str] = set([
+ ])
- @rx.setter
- def rx(self, rx):
- """Sets the rx of this MetricsSample.
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of MetricsSample from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "rx": obj.get("rx"),
+ "tx": obj.get("tx"),
+ "timestamp": obj.get("timestamp")
+ })
+ return _obj
- :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
index 7ef8aac4..80af2b23 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/overview.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/overview.py
@@ -3,134 +3,95 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
+from typing import Any, ClassVar, Dict, List, Optional
+from zrok_api.models.environment_and_resources import EnvironmentAndResources
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Overview(BaseModel):
"""
- """
- 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]'
- }
+ Overview
+ """ # noqa: E501
+ account_limited: Optional[StrictBool] = Field(default=None, alias="accountLimited")
+ environments: Optional[List[EnvironmentAndResources]] = None
+ __properties: ClassVar[List[str]] = ["accountLimited", "environments"]
- 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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The account_limited of this Overview. # noqa: E501
- :rtype: bool
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Overview from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._account_limited
+ excluded_fields: Set[str] = set([
+ ])
- @account_limited.setter
- def account_limited(self, account_limited):
- """Sets the account_limited of this Overview.
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in environments (list)
+ _items = []
+ if self.environments:
+ for _item in self.environments:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['environments'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Overview from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "accountLimited": obj.get("accountLimited"),
+ "environments": [EnvironmentAndResources.from_dict(_item) for _item in obj["environments"]] if obj.get("environments") is not None else None
+ })
+ return _obj
- :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
index 0f1c6ff4..6ff9f756 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/principal.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/principal.py
@@ -3,212 +3,93 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Principal(BaseModel):
"""
- """
- 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'
- }
+ Principal
+ """ # noqa: E501
+ id: Optional[StrictInt] = None
+ email: Optional[StrictStr] = None
+ token: Optional[StrictStr] = None
+ limitless: Optional[StrictBool] = None
+ admin: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["id", "email", "token", "limitless", "admin"]
- 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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The id of this Principal. # noqa: E501
- :rtype: int
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Principal from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._id
+ excluded_fields: Set[str] = set([
+ ])
- @id.setter
- def id(self, id):
- """Sets the id of this Principal.
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Principal from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "email": obj.get("email"),
+ "token": obj.get("token"),
+ "limitless": obj.get("limitless"),
+ "admin": obj.get("admin")
+ })
+ return _obj
- :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_token200_response.py b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token200_response.py
new file mode 100644
index 00000000..ccaf7ff4
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token200_response.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RegenerateAccountToken200Response(BaseModel):
+ """
+ RegenerateAccountToken200Response
+ """ # noqa: E501
+ account_token: Optional[StrictStr] = Field(default=None, alias="accountToken")
+ __properties: ClassVar[List[str]] = ["accountToken"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RegenerateAccountToken200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RegenerateAccountToken200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "accountToken": obj.get("accountToken")
+ })
+ return _obj
+
+
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/regenerate_account_token_request.py b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_request.py
new file mode 100644
index 00000000..32f2029f
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_request.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RegenerateAccountTokenRequest(BaseModel):
+ """
+ RegenerateAccountTokenRequest
+ """ # noqa: E501
+ email_address: Optional[StrictStr] = Field(default=None, alias="emailAddress")
+ __properties: ClassVar[List[str]] = ["emailAddress"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RegenerateAccountTokenRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RegenerateAccountTokenRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "emailAddress": obj.get("emailAddress")
+ })
+ return _obj
+
+
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/register_request.py b/sdk/python/sdk/zrok/zrok_api/models/register_request.py
new file mode 100644
index 00000000..f2bf90bd
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/register_request.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RegisterRequest(BaseModel):
+ """
+ RegisterRequest
+ """ # noqa: E501
+ register_token: Optional[StrictStr] = Field(default=None, alias="registerToken")
+ password: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["registerToken", "password"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RegisterRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RegisterRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "registerToken": obj.get("registerToken"),
+ "password": obj.get("password")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/remove_organization_member_request.py b/sdk/python/sdk/zrok/zrok_api/models/remove_organization_member_request.py
new file mode 100644
index 00000000..28b6bd25
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/remove_organization_member_request.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RemoveOrganizationMemberRequest(BaseModel):
+ """
+ RemoveOrganizationMemberRequest
+ """ # noqa: E501
+ organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken")
+ email: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["organizationToken", "email"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RemoveOrganizationMemberRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RemoveOrganizationMemberRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "organizationToken": obj.get("organizationToken"),
+ "email": obj.get("email")
+ })
+ return _obj
+
+
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.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py
new file mode 100644
index 00000000..a81c4bd3
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResetPasswordRequest(BaseModel):
+ """
+ ResetPasswordRequest
+ """ # noqa: E501
+ reset_token: Optional[StrictStr] = Field(default=None, alias="resetToken")
+ password: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["resetToken", "password"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ResetPasswordRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ResetPasswordRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "resetToken": obj.get("resetToken"),
+ "password": obj.get("password")
+ })
+ return _obj
+
+
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
index abdb66af..76a63e37 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/share.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/share.py
@@ -3,394 +3,115 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from zrok_api.models.spark_data_sample import SparkDataSample
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Share(BaseModel):
"""
- """
- 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'
- }
+ Share
+ """ # noqa: E501
+ share_token: Optional[StrictStr] = Field(default=None, alias="shareToken")
+ z_id: Optional[StrictStr] = Field(default=None, alias="zId")
+ share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode")
+ backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode")
+ frontend_selection: Optional[StrictStr] = Field(default=None, alias="frontendSelection")
+ frontend_endpoint: Optional[StrictStr] = Field(default=None, alias="frontendEndpoint")
+ backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint")
+ reserved: Optional[StrictBool] = None
+ activity: Optional[List[SparkDataSample]] = None
+ limited: Optional[StrictBool] = None
+ created_at: Optional[StrictInt] = Field(default=None, alias="createdAt")
+ updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt")
+ __properties: ClassVar[List[str]] = ["shareToken", "zId", "shareMode", "backendMode", "frontendSelection", "frontendEndpoint", "backendProxyEndpoint", "reserved", "activity", "limited", "createdAt", "updatedAt"]
- 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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The share_token of this Share. # noqa: E501
- :rtype: str
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Share from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._share_token
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in activity (list)
+ _items = []
+ if self.activity:
+ for _item in self.activity:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['activity'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Share from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "shareToken": obj.get("shareToken"),
+ "zId": obj.get("zId"),
+ "shareMode": obj.get("shareMode"),
+ "backendMode": obj.get("backendMode"),
+ "frontendSelection": obj.get("frontendSelection"),
+ "frontendEndpoint": obj.get("frontendEndpoint"),
+ "backendProxyEndpoint": obj.get("backendProxyEndpoint"),
+ "reserved": obj.get("reserved"),
+ "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None,
+ "limited": obj.get("limited"),
+ "createdAt": obj.get("createdAt"),
+ "updatedAt": obj.get("updatedAt")
+ })
+ return _obj
- @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
index ee9a08b1..f29b9c89 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/share_request.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/share_request.py
@@ -3,470 +3,159 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from zrok_api.models.auth_user import AuthUser
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ShareRequest(BaseModel):
"""
- """
- 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'
- }
+ ShareRequest
+ """ # noqa: E501
+ env_zid: Optional[StrictStr] = Field(default=None, alias="envZId")
+ share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode")
+ frontend_selection: Optional[List[StrictStr]] = Field(default=None, alias="frontendSelection")
+ backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode")
+ backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint")
+ auth_scheme: Optional[StrictStr] = Field(default=None, alias="authScheme")
+ auth_users: Optional[List[AuthUser]] = Field(default=None, alias="authUsers")
+ oauth_provider: Optional[StrictStr] = Field(default=None, alias="oauthProvider")
+ oauth_email_domains: Optional[List[StrictStr]] = Field(default=None, alias="oauthEmailDomains")
+ oauth_authorization_check_interval: Optional[StrictStr] = Field(default=None, alias="oauthAuthorizationCheckInterval")
+ reserved: Optional[StrictBool] = None
+ permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode")
+ access_grants: Optional[List[StrictStr]] = Field(default=None, alias="accessGrants")
+ unique_name: Optional[StrictStr] = Field(default=None, alias="uniqueName")
+ __properties: ClassVar[List[str]] = ["envZId", "shareMode", "frontendSelection", "backendMode", "backendProxyEndpoint", "authScheme", "authUsers", "oauthProvider", "oauthEmailDomains", "oauthAuthorizationCheckInterval", "reserved", "permissionMode", "accessGrants", "uniqueName"]
- 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'
- }
+ @field_validator('share_mode')
+ def share_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
- 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
+ if value not in set(['public', 'private']):
+ raise ValueError("must be one of enum values ('public', 'private')")
+ return value
- @property
- def env_zid(self):
- """Gets the env_zid of this ShareRequest. # noqa: E501
+ @field_validator('backend_mode')
+ def backend_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn']):
+ raise ValueError("must be one of enum values ('proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn')")
+ return value
+
+ @field_validator('oauth_provider')
+ def oauth_provider_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['github', 'google']):
+ raise ValueError("must be one of enum values ('github', 'google')")
+ return value
+
+ @field_validator('permission_mode')
+ def permission_mode_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['open', 'closed']):
+ raise ValueError("must be one of enum values ('open', 'closed')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The env_zid of this ShareRequest. # noqa: E501
- :rtype: str
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ShareRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._env_zid
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in auth_users (list)
+ _items = []
+ if self.auth_users:
+ for _item in self.auth_users:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['authUsers'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ShareRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "envZId": obj.get("envZId"),
+ "shareMode": obj.get("shareMode"),
+ "frontendSelection": obj.get("frontendSelection"),
+ "backendMode": obj.get("backendMode"),
+ "backendProxyEndpoint": obj.get("backendProxyEndpoint"),
+ "authScheme": obj.get("authScheme"),
+ "authUsers": [AuthUser.from_dict(_item) for _item in obj["authUsers"]] if obj.get("authUsers") is not None else None,
+ "oauthProvider": obj.get("oauthProvider"),
+ "oauthEmailDomains": obj.get("oauthEmailDomains"),
+ "oauthAuthorizationCheckInterval": obj.get("oauthAuthorizationCheckInterval"),
+ "reserved": obj.get("reserved"),
+ "permissionMode": obj.get("permissionMode"),
+ "accessGrants": obj.get("accessGrants"),
+ "uniqueName": obj.get("uniqueName")
+ })
+ return _obj
- @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
index dcb30e38..8fa25d60 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/share_response.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/share_response.py
@@ -3,134 +3,87 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ShareResponse(BaseModel):
"""
- """
- 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'
- }
+ ShareResponse
+ """ # noqa: E501
+ frontend_proxy_endpoints: Optional[List[StrictStr]] = Field(default=None, alias="frontendProxyEndpoints")
+ share_token: Optional[StrictStr] = Field(default=None, alias="shareToken")
+ __properties: ClassVar[List[str]] = ["frontendProxyEndpoints", "shareToken"]
- 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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The frontend_proxy_endpoints of this ShareResponse. # noqa: E501
- :rtype: list[str]
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ShareResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._frontend_proxy_endpoints
+ excluded_fields: Set[str] = set([
+ ])
- @frontend_proxy_endpoints.setter
- def frontend_proxy_endpoints(self, frontend_proxy_endpoints):
- """Sets the frontend_proxy_endpoints of this ShareResponse.
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ShareResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "frontendProxyEndpoints": obj.get("frontendProxyEndpoints"),
+ "shareToken": obj.get("shareToken")
+ })
+ return _obj
- :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
index 52a1c1fd..23c4ef51 100644
--- a/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py
+++ b/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py
@@ -3,134 +3,87 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- 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.
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing import Optional, Set
+from typing_extensions import Self
+
+class SparkDataSample(BaseModel):
"""
- """
- 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'
- }
+ SparkDataSample
+ """ # noqa: E501
+ rx: Optional[Union[StrictFloat, StrictInt]] = None
+ tx: Optional[Union[StrictFloat, StrictInt]] = None
+ __properties: ClassVar[List[str]] = ["rx", "tx"]
- 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
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
- :return: The rx of this SparkDataSample. # noqa: E501
- :rtype: float
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of SparkDataSample from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
"""
- return self._rx
+ excluded_fields: Set[str] = set([
+ ])
- @rx.setter
- def rx(self, rx):
- """Sets the rx of this SparkDataSample.
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SparkDataSample from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "rx": obj.get("rx"),
+ "tx": obj.get("tx")
+ })
+ return _obj
- :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/unaccess_request.py b/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py
new file mode 100644
index 00000000..19a3f5df
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UnaccessRequest(BaseModel):
+ """
+ UnaccessRequest
+ """ # noqa: E501
+ frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken")
+ env_zid: Optional[StrictStr] = Field(default=None, alias="envZId")
+ share_token: Optional[StrictStr] = Field(default=None, alias="shareToken")
+ __properties: ClassVar[List[str]] = ["frontendToken", "envZId", "shareToken"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of UnaccessRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of UnaccessRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "frontendToken": obj.get("frontendToken"),
+ "envZId": obj.get("envZId"),
+ "shareToken": obj.get("shareToken")
+ })
+ return _obj
+
+
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/unshare_request.py b/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py
new file mode 100644
index 00000000..3ff557e1
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UnshareRequest(BaseModel):
+ """
+ UnshareRequest
+ """ # noqa: E501
+ env_zid: Optional[StrictStr] = Field(default=None, alias="envZId")
+ share_token: Optional[StrictStr] = Field(default=None, alias="shareToken")
+ reserved: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["envZId", "shareToken", "reserved"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of UnshareRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of UnshareRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "envZId": obj.get("envZId"),
+ "shareToken": obj.get("shareToken"),
+ "reserved": obj.get("reserved")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_access_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_access_request.py
new file mode 100644
index 00000000..a27f9623
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/update_access_request.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateAccessRequest(BaseModel):
+ """
+ UpdateAccessRequest
+ """ # noqa: E501
+ frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken")
+ bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress")
+ description: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["frontendToken", "bindAddress", "description"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of UpdateAccessRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of UpdateAccessRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "frontendToken": obj.get("frontendToken"),
+ "bindAddress": obj.get("bindAddress"),
+ "description": obj.get("description")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py
new file mode 100644
index 00000000..52916296
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateFrontendRequest(BaseModel):
+ """
+ UpdateFrontendRequest
+ """ # noqa: E501
+ frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken")
+ public_name: Optional[StrictStr] = Field(default=None, alias="publicName")
+ url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate")
+ __properties: ClassVar[List[str]] = ["frontendToken", "publicName", "urlTemplate"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of UpdateFrontendRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of UpdateFrontendRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "frontendToken": obj.get("frontendToken"),
+ "publicName": obj.get("publicName"),
+ "urlTemplate": obj.get("urlTemplate")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py
new file mode 100644
index 00000000..9e3de749
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateShareRequest(BaseModel):
+ """
+ UpdateShareRequest
+ """ # noqa: E501
+ share_token: Optional[StrictStr] = Field(default=None, alias="shareToken")
+ backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint")
+ add_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="addAccessGrants")
+ remove_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="removeAccessGrants")
+ __properties: ClassVar[List[str]] = ["shareToken", "backendProxyEndpoint", "addAccessGrants", "removeAccessGrants"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of UpdateShareRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of UpdateShareRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "shareToken": obj.get("shareToken"),
+ "backendProxyEndpoint": obj.get("backendProxyEndpoint"),
+ "addAccessGrants": obj.get("addAccessGrants"),
+ "removeAccessGrants": obj.get("removeAccessGrants")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify200_response.py b/sdk/python/sdk/zrok/zrok_api/models/verify200_response.py
new file mode 100644
index 00000000..4709d646
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/verify200_response.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Verify200Response(BaseModel):
+ """
+ Verify200Response
+ """ # noqa: E501
+ email: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["email"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Verify200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Verify200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email")
+ })
+ return _obj
+
+
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/verify_request.py b/sdk/python/sdk/zrok/zrok_api/models/verify_request.py
new file mode 100644
index 00000000..76def799
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/verify_request.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class VerifyRequest(BaseModel):
+ """
+ VerifyRequest
+ """ # noqa: E501
+ register_token: Optional[StrictStr] = Field(default=None, alias="registerToken")
+ __properties: ClassVar[List[str]] = ["registerToken"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of VerifyRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of VerifyRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "registerToken": obj.get("registerToken")
+ })
+ return _obj
+
+
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/models/version_inventory200_response.py b/sdk/python/sdk/zrok/zrok_api/models/version_inventory200_response.py
new file mode 100644
index 00000000..8cbf4288
--- /dev/null
+++ b/sdk/python/sdk/zrok/zrok_api/models/version_inventory200_response.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ zrok
+
+ zrok client access
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class VersionInventory200Response(BaseModel):
+ """
+ VersionInventory200Response
+ """ # noqa: E501
+ controller_version: Optional[StrictStr] = Field(default=None, alias="controllerVersion")
+ __properties: ClassVar[List[str]] = ["controllerVersion"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of VersionInventory200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of VersionInventory200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "controllerVersion": obj.get("controllerVersion")
+ })
+ return _obj
+
+
diff --git a/sdk/python/sdk/zrok/zrok_api/py.typed b/sdk/python/sdk/zrok/zrok_api/py.typed
new file mode 100644
index 00000000..e69de29b
diff --git a/sdk/python/sdk/zrok/zrok_api/rest.py b/sdk/python/sdk/zrok/zrok_api/rest.py
index a2c54065..1d80eeba 100644
--- a/sdk/python/sdk/zrok/zrok_api/rest.py
+++ b/sdk/python/sdk/zrok/zrok_api/rest.py
@@ -3,59 +3,66 @@
"""
zrok
- zrok client access # noqa: E501
+ zrok client access
- OpenAPI spec version: 1.0.0
-
- Generated by: https://github.com/swagger-api/swagger-codegen.git
-"""
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
-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
+import urllib3
-try:
- import urllib3
-except ImportError:
- raise ImportError('Swagger python client requires urllib3.')
+from zrok_api.exceptions import ApiException, ApiValueError
+
+SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"}
+RESTResponseType = urllib3.HTTPResponse
-logger = logging.getLogger(__name__)
+def is_socks_proxy_url(url):
+ if url is None:
+ return False
+ split_section = url.split("://")
+ if len(split_section) < 2:
+ return False
+ else:
+ return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES
class RESTResponse(io.IOBase):
- def __init__(self, resp):
- self.urllib3_response = resp
+ def __init__(self, resp) -> None:
+ self.response = resp
self.status = resp.status
self.reason = resp.reason
- self.data = resp.data
+ self.data = None
+
+ def read(self):
+ if self.data is None:
+ self.data = self.response.data
+ return self.data
def getheaders(self):
"""Returns a dictionary of the response headers."""
- return self.urllib3_response.getheaders()
+ return self.response.headers
def getheader(self, name, default=None):
"""Returns a given response header."""
- return self.urllib3_response.getheader(name, default)
+ return self.response.headers.get(name, default)
-class RESTClientObject(object):
+class RESTClientObject:
- def __init__(self, configuration, pools_size=4, maxsize=None):
+ def __init__(self, configuration) -> 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
@@ -64,73 +71,82 @@ class RESTClientObject(object):
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 = {}
+ pool_args = {
+ "cert_reqs": cert_reqs,
+ "ca_certs": configuration.ssl_ca_cert,
+ "cert_file": configuration.cert_file,
+ "key_file": configuration.key_file,
+ }
if configuration.assert_hostname is not None:
- addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
+ pool_args['assert_hostname'] = (
+ configuration.assert_hostname
+ )
- if maxsize is None:
- if configuration.connection_pool_maxsize is not None:
- maxsize = configuration.connection_pool_maxsize
- else:
- maxsize = 4
+ if configuration.retries is not None:
+ pool_args['retries'] = configuration.retries
+
+ if configuration.tls_server_name:
+ pool_args['server_hostname'] = configuration.tls_server_name
+
+
+ if configuration.socket_options is not None:
+ pool_args['socket_options'] = configuration.socket_options
+
+ if configuration.connection_pool_maxsize is not None:
+ pool_args['maxsize'] = configuration.connection_pool_maxsize
# 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
- )
+ self.pool_manager: urllib3.PoolManager
- def request(self, method, url, query_params=None, headers=None,
- body=None, post_params=None, _preload_content=True,
- _request_timeout=None):
+ if configuration.proxy:
+ if is_socks_proxy_url(configuration.proxy):
+ from urllib3.contrib.socks import SOCKSProxyManager
+ pool_args["proxy_url"] = configuration.proxy
+ pool_args["headers"] = configuration.proxy_headers
+ self.pool_manager = SOCKSProxyManager(**pool_args)
+ else:
+ pool_args["proxy_url"] = configuration.proxy
+ pool_args["proxy_headers"] = configuration.proxy_headers
+ self.pool_manager = urllib3.ProxyManager(**pool_args)
+ else:
+ self.pool_manager = urllib3.PoolManager(**pool_args)
+
+ def request(
+ self,
+ method,
+ url,
+ headers=None,
+ body=None,
+ post_params=None,
+ _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']
+ assert method in [
+ 'GET',
+ 'HEAD',
+ 'DELETE',
+ 'POST',
+ 'PUT',
+ 'PATCH',
+ 'OPTIONS'
+ ]
if post_params and body:
- raise ValueError(
+ raise ApiValueError(
"body parameter cannot be used with post_params parameter."
)
@@ -139,60 +155,83 @@ class RESTClientObject(object):
timeout = None
if _request_timeout:
- if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
+ if isinstance(_request_timeout, (int, float)):
timeout = urllib3.Timeout(total=_request_timeout)
- elif (isinstance(_request_timeout, tuple) and
- len(_request_timeout) == 2):
+ 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'
+ connect=_request_timeout[0],
+ read=_request_timeout[1]
+ )
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 = '{}'
+
+ # no content type provided or payload is json
+ content_type = headers.get('Content-Type')
+ if (
+ not content_type
+ or re.search('json', content_type, re.IGNORECASE)
+ ):
+ request_body = None
if body is not None:
request_body = json.dumps(body)
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
body=request_body,
- preload_content=_preload_content,
timeout=timeout,
- headers=headers)
- elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
+ headers=headers,
+ preload_content=False
+ )
+ elif content_type == 'application/x-www-form-urlencoded':
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
fields=post_params,
encode_multipart=False,
- preload_content=_preload_content,
timeout=timeout,
- headers=headers)
- elif headers['Content-Type'] == 'multipart/form-data':
+ headers=headers,
+ preload_content=False
+ )
+ elif 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']
+ # Ensures that dict objects are serialized
+ post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params]
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
fields=post_params,
encode_multipart=True,
- preload_content=_preload_content,
timeout=timeout,
- headers=headers)
+ headers=headers,
+ preload_content=False
+ )
# 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
+ # other content types than JSON when `body` argument is
+ # provided in serialized form.
+ elif isinstance(body, str) or isinstance(body, bytes):
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
+ body=body,
+ timeout=timeout,
+ headers=headers,
+ preload_content=False
+ )
+ elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool):
+ request_body = "true" if body else "false"
+ r = self.pool_manager.request(
+ method,
+ url,
body=request_body,
- preload_content=_preload_content,
+ preload_content=False,
timeout=timeout,
headers=headers)
else:
@@ -203,115 +242,16 @@ class RESTClientObject(object):
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)
+ r = self.pool_manager.request(
+ method,
+ url,
+ fields={},
+ timeout=timeout,
+ headers=headers,
+ preload_content=False
+ )
except urllib3.exceptions.SSLError as e:
- msg = "{0}\n{1}".format(type(e).__name__, str(e))
+ msg = "\n".join([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
+ return RESTResponse(r)