mirror of
https://github.com/openziti/zrok.git
synced 2025-06-27 05:01:26 +02:00
upgrade generator
This commit is contained in:
parent
e7b4efab89
commit
320172e2c9
@ -1 +1 @@
|
||||
7.7.0
|
||||
7.12.0
|
||||
|
@ -5,12 +5,12 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Generator version: 7.7.0
|
||||
- Generator version: 7.12.0
|
||||
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
||||
|
||||
## Requirements.
|
||||
|
||||
Python 3.7+
|
||||
Python 3.8+
|
||||
|
||||
## Installation & Usage
|
||||
### pip install
|
||||
|
@ -17,8 +17,6 @@ Method | HTTP request | Description
|
||||
# **change_password**
|
||||
> change_password(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -95,8 +93,6 @@ void (empty response body)
|
||||
# **invite**
|
||||
> invite(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
@ -161,8 +157,6 @@ No authorization required
|
||||
# **login**
|
||||
> str login(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
@ -227,8 +221,6 @@ No authorization required
|
||||
# **regenerate_account_token**
|
||||
> RegenerateAccountToken200Response regenerate_account_token(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -306,8 +298,6 @@ Name | Type | Description | Notes
|
||||
# **register**
|
||||
> RegenerateAccountToken200Response register(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
@ -375,8 +365,6 @@ No authorization required
|
||||
# **reset_password**
|
||||
> reset_password(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
@ -441,8 +429,6 @@ No authorization required
|
||||
# **reset_password_request**
|
||||
> reset_password_request(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
@ -506,8 +492,6 @@ No authorization required
|
||||
# **verify**
|
||||
> Verify200Response verify(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
|
@ -23,8 +23,6 @@ Method | HTTP request | Description
|
||||
# **add_organization_member**
|
||||
> add_organization_member(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -100,8 +98,6 @@ void (empty response body)
|
||||
# **create_account**
|
||||
> RegenerateAccountToken200Response create_account(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -179,8 +175,6 @@ Name | Type | Description | Notes
|
||||
# **create_frontend**
|
||||
> CreateFrontend201Response create_frontend(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -260,8 +254,6 @@ Name | Type | Description | Notes
|
||||
# **create_identity**
|
||||
> CreateIdentity201Response create_identity(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -339,8 +331,6 @@ Name | Type | Description | Notes
|
||||
# **create_organization**
|
||||
> CreateOrganization201Response create_organization(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -418,8 +408,6 @@ Name | Type | Description | Notes
|
||||
# **delete_frontend**
|
||||
> delete_frontend(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -495,8 +483,6 @@ void (empty response body)
|
||||
# **delete_organization**
|
||||
> delete_organization(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -572,8 +558,6 @@ void (empty response body)
|
||||
# **grants**
|
||||
> grants(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -649,8 +633,6 @@ void (empty response body)
|
||||
# **invite_token_generate**
|
||||
> invite_token_generate(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -726,8 +708,6 @@ void (empty response body)
|
||||
# **list_frontends**
|
||||
> List[ListFrontends200ResponseInner] list_frontends()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -800,8 +780,6 @@ This endpoint does not need any parameter.
|
||||
# **list_organization_members**
|
||||
> ListOrganizationMembers200Response list_organization_members(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -880,8 +858,6 @@ Name | Type | Description | Notes
|
||||
# **list_organizations**
|
||||
> ListOrganizations200Response list_organizations()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -954,8 +930,6 @@ This endpoint does not need any parameter.
|
||||
# **remove_organization_member**
|
||||
> remove_organization_member(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -1031,8 +1005,6 @@ void (empty response body)
|
||||
# **update_frontend**
|
||||
> update_frontend(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
|
@ -11,8 +11,6 @@ Method | HTTP request | Description
|
||||
# **disable**
|
||||
> disable(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -87,8 +85,6 @@ void (empty response body)
|
||||
# **enable**
|
||||
> CreateIdentity201Response enable(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
|
@ -25,8 +25,6 @@ Method | HTTP request | Description
|
||||
# **client_version_check**
|
||||
> client_version_check(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
@ -89,8 +87,6 @@ No authorization required
|
||||
# **configuration**
|
||||
> Configuration configuration()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
@ -150,8 +146,6 @@ No authorization required
|
||||
# **get_account_detail**
|
||||
> List[Environment] get_account_detail()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -223,8 +217,6 @@ This endpoint does not need any parameter.
|
||||
# **get_account_metrics**
|
||||
> Metrics get_account_metrics(duration=duration)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -301,8 +293,6 @@ Name | Type | Description | Notes
|
||||
# **get_environment_detail**
|
||||
> EnvironmentAndResources get_environment_detail(env_zid)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -380,8 +370,6 @@ Name | Type | Description | Notes
|
||||
# **get_environment_metrics**
|
||||
> Metrics get_environment_metrics(env_id, duration=duration)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -461,8 +449,6 @@ Name | Type | Description | Notes
|
||||
# **get_frontend_detail**
|
||||
> Frontend get_frontend_detail(frontend_id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -540,8 +526,6 @@ Name | Type | Description | Notes
|
||||
# **get_share_detail**
|
||||
> Share get_share_detail(share_token)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -619,8 +603,6 @@ Name | Type | Description | Notes
|
||||
# **get_share_metrics**
|
||||
> Metrics get_share_metrics(share_token, duration=duration)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -700,8 +682,6 @@ Name | Type | Description | Notes
|
||||
# **get_sparklines**
|
||||
> GetSparklines200Response get_sparklines(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -779,8 +759,6 @@ Name | Type | Description | Notes
|
||||
# **list_memberships**
|
||||
> ListMemberships200Response list_memberships()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -852,8 +830,6 @@ This endpoint does not need any parameter.
|
||||
# **list_org_members**
|
||||
> ListOrganizationMembers200Response list_org_members(organization_token)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -930,8 +906,6 @@ Name | Type | Description | Notes
|
||||
# **org_account_overview**
|
||||
> Overview org_account_overview(organization_token, account_email)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -1010,8 +984,6 @@ Name | Type | Description | Notes
|
||||
# **overview**
|
||||
> Overview overview()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -1083,8 +1055,6 @@ This endpoint does not need any parameter.
|
||||
# **version**
|
||||
> str version()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
@ -1143,8 +1113,6 @@ No authorization required
|
||||
# **version_inventory**
|
||||
> VersionInventory200Response version_inventory()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
|
@ -15,8 +15,6 @@ Method | HTTP request | Description
|
||||
# **access**
|
||||
> Access201Response access(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -95,8 +93,6 @@ Name | Type | Description | Notes
|
||||
# **share**
|
||||
> ShareResponse share(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -177,8 +173,6 @@ Name | Type | Description | Notes
|
||||
# **unaccess**
|
||||
> unaccess(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -254,8 +248,6 @@ void (empty response body)
|
||||
# **unshare**
|
||||
> unshare(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -331,8 +323,6 @@ void (empty response body)
|
||||
# **update_access**
|
||||
> update_access(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
@ -408,8 +398,6 @@ void (empty response body)
|
||||
# **update_share**
|
||||
> update_share(body=body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (key):
|
||||
|
@ -1,5 +1,4 @@
|
||||
python_dateutil >= 2.5.3
|
||||
setuptools >= 21.0.0
|
||||
urllib3 >= 1.25.3, < 2.1.0
|
||||
urllib3 >= 1.25.3, < 3.0.0
|
||||
python_dateutil >= 2.8.2
|
||||
pydantic >= 2
|
||||
typing-extensions >= 4.7.1
|
||||
|
@ -270,7 +270,9 @@ class AccountApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -548,7 +550,9 @@ class AccountApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -819,7 +823,9 @@ class AccountApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1093,7 +1099,9 @@ class AccountApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1371,7 +1379,9 @@ class AccountApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1648,7 +1658,9 @@ class AccountApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1922,7 +1934,9 @@ class AccountApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -2189,7 +2203,9 @@ class AccountApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
|
@ -273,7 +273,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -541,7 +543,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -822,7 +826,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1097,7 +1103,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1372,7 +1380,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1650,7 +1660,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1921,7 +1933,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -2192,7 +2206,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -2463,7 +2479,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -2718,7 +2736,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -2981,7 +3001,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -3243,7 +3265,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -3506,7 +3530,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -3777,7 +3803,9 @@ class AdminApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
|
@ -257,7 +257,9 @@ class EnvironmentApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -528,7 +530,9 @@ class EnvironmentApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
|
@ -265,7 +265,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -520,7 +522,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -763,7 +767,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1023,7 +1029,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1290,7 +1298,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1568,7 +1578,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1837,7 +1849,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -2102,7 +2116,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -2380,7 +2396,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -2646,7 +2664,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -2905,7 +2925,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -3165,7 +3187,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -3440,7 +3464,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -3688,7 +3714,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -3929,7 +3957,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -4169,7 +4199,9 @@ class MetadataApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
|
@ -265,7 +265,9 @@ class ShareApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -549,7 +551,9 @@ class ShareApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -827,7 +831,9 @@ class ShareApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1098,7 +1104,9 @@ class ShareApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1376,7 +1384,9 @@ class ShareApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
@ -1650,7 +1660,9 @@ class ShareApi:
|
||||
_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]] = {}
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
|
@ -15,6 +15,7 @@
|
||||
import datetime
|
||||
from dateutil.parser import parse
|
||||
from enum import Enum
|
||||
import decimal
|
||||
import json
|
||||
import mimetypes
|
||||
import os
|
||||
@ -66,6 +67,7 @@ class ApiClient:
|
||||
'bool': bool,
|
||||
'date': datetime.date,
|
||||
'datetime': datetime.datetime,
|
||||
'decimal': decimal.Decimal,
|
||||
'object': object,
|
||||
}
|
||||
_pool = None
|
||||
@ -338,6 +340,7 @@ class ApiClient:
|
||||
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 decimal.Decimal return string representation.
|
||||
If obj is list, sanitize each element in the list.
|
||||
If obj is dict, return the dict.
|
||||
If obj is OpenAPI model, return the properties dict.
|
||||
@ -363,6 +366,8 @@ class ApiClient:
|
||||
)
|
||||
elif isinstance(obj, (datetime.datetime, datetime.date)):
|
||||
return obj.isoformat()
|
||||
elif isinstance(obj, decimal.Decimal):
|
||||
return str(obj)
|
||||
|
||||
elif isinstance(obj, dict):
|
||||
obj_dict = obj
|
||||
@ -399,12 +404,12 @@ class ApiClient:
|
||||
data = json.loads(response_text)
|
||||
except ValueError:
|
||||
data = response_text
|
||||
elif content_type.startswith("application/json"):
|
||||
elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
|
||||
if response_text == "":
|
||||
data = ""
|
||||
else:
|
||||
data = json.loads(response_text)
|
||||
elif content_type.startswith("text/plain"):
|
||||
elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE):
|
||||
data = response_text
|
||||
else:
|
||||
raise ApiException(
|
||||
@ -454,6 +459,8 @@ class ApiClient:
|
||||
return self.__deserialize_date(data)
|
||||
elif klass == datetime.datetime:
|
||||
return self.__deserialize_datetime(data)
|
||||
elif klass == decimal.Decimal:
|
||||
return decimal.Decimal(data)
|
||||
elif issubclass(klass, Enum):
|
||||
return self.__deserialize_enum(data, klass)
|
||||
else:
|
||||
@ -510,7 +517,7 @@ class ApiClient:
|
||||
if k in collection_formats:
|
||||
collection_format = collection_formats[k]
|
||||
if collection_format == 'multi':
|
||||
new_params.extend((k, str(value)) for value in v)
|
||||
new_params.extend((k, quote(str(value))) for value in v)
|
||||
else:
|
||||
if collection_format == 'ssv':
|
||||
delimiter = ' '
|
||||
@ -528,7 +535,10 @@ class ApiClient:
|
||||
|
||||
return "&".join(["=".join(map(str, item)) for item in new_params])
|
||||
|
||||
def files_parameters(self, files: Dict[str, Union[str, bytes]]):
|
||||
def files_parameters(
|
||||
self,
|
||||
files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]],
|
||||
):
|
||||
"""Builds form parameters.
|
||||
|
||||
:param files: File parameters.
|
||||
@ -543,6 +553,12 @@ class ApiClient:
|
||||
elif isinstance(v, bytes):
|
||||
filename = k
|
||||
filedata = v
|
||||
elif isinstance(v, tuple):
|
||||
filename, filedata = v
|
||||
elif isinstance(v, list):
|
||||
for file_param in v:
|
||||
params.extend(self.files_parameters({k: file_param}))
|
||||
continue
|
||||
else:
|
||||
raise ValueError("Unsupported file value")
|
||||
mimetype = (
|
||||
|
@ -13,14 +13,16 @@
|
||||
|
||||
|
||||
import copy
|
||||
import http.client as httplib
|
||||
import logging
|
||||
from logging import FileHandler
|
||||
import multiprocessing
|
||||
import sys
|
||||
from typing import Optional
|
||||
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
|
||||
from typing_extensions import NotRequired, Self
|
||||
|
||||
import urllib3
|
||||
|
||||
import http.client as httplib
|
||||
|
||||
JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
||||
'multipleOf', 'maximum', 'exclusiveMaximum',
|
||||
@ -28,6 +30,107 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
||||
'minLength', 'pattern', 'maxItems', 'minItems'
|
||||
}
|
||||
|
||||
ServerVariablesT = Dict[str, str]
|
||||
|
||||
GenericAuthSetting = TypedDict(
|
||||
"GenericAuthSetting",
|
||||
{
|
||||
"type": str,
|
||||
"in": str,
|
||||
"key": str,
|
||||
"value": str,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
OAuth2AuthSetting = TypedDict(
|
||||
"OAuth2AuthSetting",
|
||||
{
|
||||
"type": Literal["oauth2"],
|
||||
"in": Literal["header"],
|
||||
"key": Literal["Authorization"],
|
||||
"value": str,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
APIKeyAuthSetting = TypedDict(
|
||||
"APIKeyAuthSetting",
|
||||
{
|
||||
"type": Literal["api_key"],
|
||||
"in": str,
|
||||
"key": str,
|
||||
"value": Optional[str],
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
BasicAuthSetting = TypedDict(
|
||||
"BasicAuthSetting",
|
||||
{
|
||||
"type": Literal["basic"],
|
||||
"in": Literal["header"],
|
||||
"key": Literal["Authorization"],
|
||||
"value": Optional[str],
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
BearerFormatAuthSetting = TypedDict(
|
||||
"BearerFormatAuthSetting",
|
||||
{
|
||||
"type": Literal["bearer"],
|
||||
"in": Literal["header"],
|
||||
"format": Literal["JWT"],
|
||||
"key": Literal["Authorization"],
|
||||
"value": str,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
BearerAuthSetting = TypedDict(
|
||||
"BearerAuthSetting",
|
||||
{
|
||||
"type": Literal["bearer"],
|
||||
"in": Literal["header"],
|
||||
"key": Literal["Authorization"],
|
||||
"value": str,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
HTTPSignatureAuthSetting = TypedDict(
|
||||
"HTTPSignatureAuthSetting",
|
||||
{
|
||||
"type": Literal["http-signature"],
|
||||
"in": Literal["header"],
|
||||
"key": Literal["Authorization"],
|
||||
"value": None,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
AuthSettings = TypedDict(
|
||||
"AuthSettings",
|
||||
{
|
||||
"key": APIKeyAuthSetting,
|
||||
},
|
||||
total=False,
|
||||
)
|
||||
|
||||
|
||||
class HostSettingVariable(TypedDict):
|
||||
description: str
|
||||
default_value: str
|
||||
enum_values: List[str]
|
||||
|
||||
|
||||
class HostSetting(TypedDict):
|
||||
url: str
|
||||
description: str
|
||||
variables: NotRequired[Dict[str, HostSettingVariable]]
|
||||
|
||||
|
||||
class Configuration:
|
||||
"""This class contains various settings of the API client.
|
||||
|
||||
@ -58,6 +161,8 @@ class Configuration:
|
||||
: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.
|
||||
:param ca_cert_data: verify the peer using concatenated CA certificate data
|
||||
in PEM (str) or DER (bytes) format.
|
||||
|
||||
:Example:
|
||||
|
||||
@ -81,20 +186,27 @@ conf = zrok_api.Configuration(
|
||||
Cookie: JSESSIONID abc123
|
||||
"""
|
||||
|
||||
_default = None
|
||||
_default: ClassVar[Optional[Self]] = 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:
|
||||
def __init__(
|
||||
self,
|
||||
host: Optional[str]=None,
|
||||
api_key: Optional[Dict[str, str]]=None,
|
||||
api_key_prefix: Optional[Dict[str, str]]=None,
|
||||
username: Optional[str]=None,
|
||||
password: Optional[str]=None,
|
||||
access_token: Optional[str]=None,
|
||||
server_index: Optional[int]=None,
|
||||
server_variables: Optional[ServerVariablesT]=None,
|
||||
server_operation_index: Optional[Dict[int, int]]=None,
|
||||
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
|
||||
ignore_operation_servers: bool=False,
|
||||
ssl_ca_cert: Optional[str]=None,
|
||||
retries: Optional[int] = None,
|
||||
ca_cert_data: Optional[Union[str, bytes]] = None,
|
||||
*,
|
||||
debug: Optional[bool] = None,
|
||||
) -> None:
|
||||
"""Constructor
|
||||
"""
|
||||
self._base_path = "/api/v1" if host is None else host
|
||||
@ -169,6 +281,10 @@ conf = zrok_api.Configuration(
|
||||
self.ssl_ca_cert = ssl_ca_cert
|
||||
"""Set this to customize the certificate file to verify the peer.
|
||||
"""
|
||||
self.ca_cert_data = ca_cert_data
|
||||
"""Set this to verify the peer using PEM (str) or DER (bytes)
|
||||
certificate data.
|
||||
"""
|
||||
self.cert_file = None
|
||||
"""client certificate file
|
||||
"""
|
||||
@ -218,7 +334,7 @@ conf = zrok_api.Configuration(
|
||||
"""date format
|
||||
"""
|
||||
|
||||
def __deepcopy__(self, memo):
|
||||
def __deepcopy__(self, memo: Dict[int, Any]) -> Self:
|
||||
cls = self.__class__
|
||||
result = cls.__new__(cls)
|
||||
memo[id(self)] = result
|
||||
@ -232,11 +348,11 @@ conf = zrok_api.Configuration(
|
||||
result.debug = self.debug
|
||||
return result
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
def __setattr__(self, name: str, value: Any) -> None:
|
||||
object.__setattr__(self, name, value)
|
||||
|
||||
@classmethod
|
||||
def set_default(cls, default):
|
||||
def set_default(cls, default: Optional[Self]) -> None:
|
||||
"""Set default instance of configuration.
|
||||
|
||||
It stores default configuration, which can be
|
||||
@ -247,7 +363,7 @@ conf = zrok_api.Configuration(
|
||||
cls._default = default
|
||||
|
||||
@classmethod
|
||||
def get_default_copy(cls):
|
||||
def get_default_copy(cls) -> Self:
|
||||
"""Deprecated. Please use `get_default` instead.
|
||||
|
||||
Deprecated. Please use `get_default` instead.
|
||||
@ -257,7 +373,7 @@ conf = zrok_api.Configuration(
|
||||
return cls.get_default()
|
||||
|
||||
@classmethod
|
||||
def get_default(cls):
|
||||
def get_default(cls) -> Self:
|
||||
"""Return the default configuration.
|
||||
|
||||
This method returns newly created, based on default constructor,
|
||||
@ -267,11 +383,11 @@ conf = zrok_api.Configuration(
|
||||
:return: The configuration object.
|
||||
"""
|
||||
if cls._default is None:
|
||||
cls._default = Configuration()
|
||||
cls._default = cls()
|
||||
return cls._default
|
||||
|
||||
@property
|
||||
def logger_file(self):
|
||||
def logger_file(self) -> Optional[str]:
|
||||
"""The logger file.
|
||||
|
||||
If the logger_file is None, then add stream handler and remove file
|
||||
@ -283,7 +399,7 @@ conf = zrok_api.Configuration(
|
||||
return self.__logger_file
|
||||
|
||||
@logger_file.setter
|
||||
def logger_file(self, value):
|
||||
def logger_file(self, value: Optional[str]) -> None:
|
||||
"""The logger file.
|
||||
|
||||
If the logger_file is None, then add stream handler and remove file
|
||||
@ -302,7 +418,7 @@ conf = zrok_api.Configuration(
|
||||
logger.addHandler(self.logger_file_handler)
|
||||
|
||||
@property
|
||||
def debug(self):
|
||||
def debug(self) -> bool:
|
||||
"""Debug status
|
||||
|
||||
:param value: The debug status, True or False.
|
||||
@ -311,7 +427,7 @@ conf = zrok_api.Configuration(
|
||||
return self.__debug
|
||||
|
||||
@debug.setter
|
||||
def debug(self, value):
|
||||
def debug(self, value: bool) -> None:
|
||||
"""Debug status
|
||||
|
||||
:param value: The debug status, True or False.
|
||||
@ -333,7 +449,7 @@ conf = zrok_api.Configuration(
|
||||
httplib.HTTPConnection.debuglevel = 0
|
||||
|
||||
@property
|
||||
def logger_format(self):
|
||||
def logger_format(self) -> str:
|
||||
"""The logger format.
|
||||
|
||||
The logger_formatter will be updated when sets logger_format.
|
||||
@ -344,7 +460,7 @@ conf = zrok_api.Configuration(
|
||||
return self.__logger_format
|
||||
|
||||
@logger_format.setter
|
||||
def logger_format(self, value):
|
||||
def logger_format(self, value: str) -> None:
|
||||
"""The logger format.
|
||||
|
||||
The logger_formatter will be updated when sets logger_format.
|
||||
@ -355,7 +471,7 @@ conf = zrok_api.Configuration(
|
||||
self.__logger_format = value
|
||||
self.logger_formatter = logging.Formatter(self.__logger_format)
|
||||
|
||||
def get_api_key_with_prefix(self, identifier, alias=None):
|
||||
def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]:
|
||||
"""Gets API key (with prefix if set).
|
||||
|
||||
:param identifier: The identifier of apiKey.
|
||||
@ -372,7 +488,9 @@ conf = zrok_api.Configuration(
|
||||
else:
|
||||
return key
|
||||
|
||||
def get_basic_auth_token(self):
|
||||
return None
|
||||
|
||||
def get_basic_auth_token(self) -> Optional[str]:
|
||||
"""Gets HTTP basic authentication header (string).
|
||||
|
||||
:return: The token for basic HTTP authentication.
|
||||
@ -387,12 +505,12 @@ conf = zrok_api.Configuration(
|
||||
basic_auth=username + ':' + password
|
||||
).get('authorization')
|
||||
|
||||
def auth_settings(self):
|
||||
def auth_settings(self)-> AuthSettings:
|
||||
"""Gets Auth Settings dict for api client.
|
||||
|
||||
:return: The Auth Settings information dict.
|
||||
"""
|
||||
auth = {}
|
||||
auth: AuthSettings = {}
|
||||
if 'key' in self.api_key:
|
||||
auth['key'] = {
|
||||
'type': 'api_key',
|
||||
@ -404,7 +522,7 @@ conf = zrok_api.Configuration(
|
||||
}
|
||||
return auth
|
||||
|
||||
def to_debug_report(self):
|
||||
def to_debug_report(self) -> str:
|
||||
"""Gets the essential information for debugging.
|
||||
|
||||
:return: The report for debugging.
|
||||
@ -416,7 +534,7 @@ conf = zrok_api.Configuration(
|
||||
"SDK Package Version: 1.0.0".\
|
||||
format(env=sys.platform, pyversion=sys.version)
|
||||
|
||||
def get_host_settings(self):
|
||||
def get_host_settings(self) -> List[HostSetting]:
|
||||
"""Gets an array of host settings
|
||||
|
||||
:return: An array of host settings
|
||||
@ -428,7 +546,12 @@ conf = zrok_api.Configuration(
|
||||
}
|
||||
]
|
||||
|
||||
def get_host_from_settings(self, index, variables=None, servers=None):
|
||||
def get_host_from_settings(
|
||||
self,
|
||||
index: Optional[int],
|
||||
variables: Optional[ServerVariablesT]=None,
|
||||
servers: Optional[List[HostSetting]]=None,
|
||||
) -> str:
|
||||
"""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
|
||||
@ -468,12 +591,12 @@ conf = zrok_api.Configuration(
|
||||
return url
|
||||
|
||||
@property
|
||||
def host(self):
|
||||
def host(self) -> str:
|
||||
"""Return generated host."""
|
||||
return self.get_host_from_settings(self.server_index, variables=self.server_variables)
|
||||
|
||||
@host.setter
|
||||
def host(self, value):
|
||||
def host(self, value: str) -> None:
|
||||
"""Fix base path."""
|
||||
self._base_path = value
|
||||
self.server_index = None
|
||||
|
@ -150,6 +150,13 @@ class ApiException(OpenApiException):
|
||||
if http_resp.status == 404:
|
||||
raise NotFoundException(http_resp=http_resp, body=body, data=data)
|
||||
|
||||
# Added new conditions for 409 and 422
|
||||
if http_resp.status == 409:
|
||||
raise ConflictException(http_resp=http_resp, body=body, data=data)
|
||||
|
||||
if http_resp.status == 422:
|
||||
raise UnprocessableEntityException(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)
|
||||
@ -188,6 +195,16 @@ class ServiceException(ApiException):
|
||||
pass
|
||||
|
||||
|
||||
class ConflictException(ApiException):
|
||||
"""Exception for HTTP 409 Conflict."""
|
||||
pass
|
||||
|
||||
|
||||
class UnprocessableEntityException(ApiException):
|
||||
"""Exception for HTTP 422 Unprocessable Entity."""
|
||||
pass
|
||||
|
||||
|
||||
def render_path(path_to_item):
|
||||
"""Returns a string representation of a path"""
|
||||
result = ""
|
||||
|
@ -79,9 +79,9 @@ class Environment(BaseModel):
|
||||
# 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())
|
||||
for _item_activity in self.activity:
|
||||
if _item_activity:
|
||||
_items.append(_item_activity.to_dict())
|
||||
_dict['activity'] = _items
|
||||
return _dict
|
||||
|
||||
|
@ -79,16 +79,16 @@ class EnvironmentAndResources(BaseModel):
|
||||
# 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())
|
||||
for _item_frontends in self.frontends:
|
||||
if _item_frontends:
|
||||
_items.append(_item_frontends.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())
|
||||
for _item_shares in self.shares:
|
||||
if _item_shares:
|
||||
_items.append(_item_shares.to_dict())
|
||||
_dict['shares'] = _items
|
||||
return _dict
|
||||
|
||||
|
@ -72,9 +72,9 @@ class GetSparklines200Response(BaseModel):
|
||||
# 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())
|
||||
for _item_sparklines in self.sparklines:
|
||||
if _item_sparklines:
|
||||
_items.append(_item_sparklines.to_dict())
|
||||
_dict['sparklines'] = _items
|
||||
return _dict
|
||||
|
||||
|
@ -72,9 +72,9 @@ class ListMemberships200Response(BaseModel):
|
||||
# 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())
|
||||
for _item_memberships in self.memberships:
|
||||
if _item_memberships:
|
||||
_items.append(_item_memberships.to_dict())
|
||||
_dict['memberships'] = _items
|
||||
return _dict
|
||||
|
||||
|
@ -72,9 +72,9 @@ class ListOrganizationMembers200Response(BaseModel):
|
||||
# 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())
|
||||
for _item_members in self.members:
|
||||
if _item_members:
|
||||
_items.append(_item_members.to_dict())
|
||||
_dict['members'] = _items
|
||||
return _dict
|
||||
|
||||
|
@ -72,9 +72,9 @@ class ListOrganizations200Response(BaseModel):
|
||||
# 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())
|
||||
for _item_organizations in self.organizations:
|
||||
if _item_organizations:
|
||||
_items.append(_item_organizations.to_dict())
|
||||
_dict['organizations'] = _items
|
||||
return _dict
|
||||
|
||||
|
@ -75,9 +75,9 @@ class Metrics(BaseModel):
|
||||
# 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())
|
||||
for _item_samples in self.samples:
|
||||
if _item_samples:
|
||||
_items.append(_item_samples.to_dict())
|
||||
_dict['samples'] = _items
|
||||
return _dict
|
||||
|
||||
|
@ -73,9 +73,9 @@ class Overview(BaseModel):
|
||||
# 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())
|
||||
for _item_environments in self.environments:
|
||||
if _item_environments:
|
||||
_items.append(_item_environments.to_dict())
|
||||
_dict['environments'] = _items
|
||||
return _dict
|
||||
|
||||
|
@ -83,9 +83,9 @@ class Share(BaseModel):
|
||||
# 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())
|
||||
for _item_activity in self.activity:
|
||||
if _item_activity:
|
||||
_items.append(_item_activity.to_dict())
|
||||
_dict['activity'] = _items
|
||||
return _dict
|
||||
|
||||
|
@ -125,9 +125,9 @@ class ShareRequest(BaseModel):
|
||||
# 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())
|
||||
for _item_auth_users in self.auth_users:
|
||||
if _item_auth_users:
|
||||
_items.append(_item_auth_users.to_dict())
|
||||
_dict['authUsers'] = _items
|
||||
return _dict
|
||||
|
||||
|
@ -76,6 +76,7 @@ class RESTClientObject:
|
||||
"ca_certs": configuration.ssl_ca_cert,
|
||||
"cert_file": configuration.cert_file,
|
||||
"key_file": configuration.key_file,
|
||||
"ca_cert_data": configuration.ca_cert_data,
|
||||
}
|
||||
if configuration.assert_hostname is not None:
|
||||
pool_args['assert_hostname'] = (
|
||||
@ -225,7 +226,7 @@ class RESTClientObject:
|
||||
headers=headers,
|
||||
preload_content=False
|
||||
)
|
||||
elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool):
|
||||
elif headers['Content-Type'].startswith('text/') and isinstance(body, bool):
|
||||
request_body = "true" if body else "false"
|
||||
r = self.pool_manager.request(
|
||||
method,
|
||||
|
Loading…
x
Reference in New Issue
Block a user