zrok2-build-debugging 22.0.2000008__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- test/__init__.py +0 -0
- test/test_access201_response.py +52 -0
- test/test_access_request.py +54 -0
- test/test_access_summary.py +60 -0
- test/test_accesses_list.py +63 -0
- test/test_account_api.py +79 -0
- test/test_add_frontend_grant_request.py +52 -0
- test/test_add_namespace_frontend_mapping_request.py +53 -0
- test/test_add_namespace_grant_request.py +52 -0
- test/test_add_organization_member_request.py +53 -0
- test/test_admin_api.py +199 -0
- test/test_agent_api.py +85 -0
- test/test_auth_user.py +52 -0
- test/test_change_password_request.py +53 -0
- test/test_client_version_check_request.py +51 -0
- test/test_configuration.py +56 -0
- test/test_create_frontend201_response.py +51 -0
- test/test_create_frontend_request.py +55 -0
- test/test_create_identity201_response.py +52 -0
- test/test_create_identity_request.py +51 -0
- test/test_create_namespace201_response.py +51 -0
- test/test_create_namespace_request.py +54 -0
- test/test_create_organization201_response.py +51 -0
- test/test_create_organization_request.py +51 -0
- test/test_create_share_name_request.py +52 -0
- test/test_delete_identity_request.py +51 -0
- test/test_disable_request.py +51 -0
- test/test_enable_request.py +52 -0
- test/test_enroll200_response.py +51 -0
- test/test_enroll_request.py +51 -0
- test/test_environment.py +63 -0
- test/test_environment_and_resources.py +96 -0
- test/test_environment_api.py +43 -0
- test/test_environment_summary.py +60 -0
- test/test_environments_list.py +63 -0
- test/test_frontend.py +59 -0
- test/test_get_sparklines200_response.py +62 -0
- test/test_get_sparklines_request.py +57 -0
- test/test_invite_request.py +52 -0
- test/test_invite_token_generate_request.py +53 -0
- test/test_list_frontend_namespace_mappings200_response_inner.py +54 -0
- test/test_list_frontends200_response_inner.py +58 -0
- test/test_list_memberships200_response.py +56 -0
- test/test_list_memberships200_response_memberships_inner.py +53 -0
- test/test_list_namespaces200_response_inner.py +56 -0
- test/test_list_organization_members200_response.py +55 -0
- test/test_list_organization_members200_response_members_inner.py +52 -0
- test/test_list_organizations200_response.py +55 -0
- test/test_list_organizations200_response_organizations_inner.py +52 -0
- test/test_list_share_namespaces200_response_inner.py +53 -0
- test/test_login_request.py +52 -0
- test/test_metadata_api.py +145 -0
- test/test_metrics.py +59 -0
- test/test_metrics_sample.py +53 -0
- test/test_name.py +56 -0
- test/test_name_selection.py +52 -0
- test/test_overview.py +110 -0
- test/test_overview_names_inner.py +56 -0
- test/test_ping200_response.py +51 -0
- test/test_principal.py +55 -0
- test/test_regenerate_account_token200_response.py +51 -0
- test/test_regenerate_account_token_request.py +51 -0
- test/test_register_request.py +52 -0
- test/test_remote_access_request.py +60 -0
- test/test_remote_share200_response.py +54 -0
- test/test_remote_share_request.py +74 -0
- test/test_remote_status200_response.py +82 -0
- test/test_remote_status200_response_accesses_inner.py +62 -0
- test/test_remote_status200_response_shares_inner.py +64 -0
- test/test_remote_status200_response_shares_inner_failure.py +54 -0
- test/test_remote_unaccess_request.py +52 -0
- test/test_remote_unshare_request.py +52 -0
- test/test_remove_namespace_frontend_mapping_request.py +52 -0
- test/test_remove_organization_member_request.py +52 -0
- test/test_reset_password_request.py +52 -0
- test/test_share.py +67 -0
- test/test_share_api.py +103 -0
- test/test_share_http_healthcheck200_response.py +52 -0
- test/test_share_http_healthcheck_request.py +56 -0
- test/test_share_request.py +75 -0
- test/test_share_response.py +54 -0
- test/test_share_summary.py +62 -0
- test/test_shares_list.py +65 -0
- test/test_spark_data_sample.py +52 -0
- test/test_unaccess_request.py +53 -0
- test/test_unshare_request.py +52 -0
- test/test_update_access_request.py +53 -0
- test/test_update_frontend_request.py +55 -0
- test/test_update_namespace_request.py +55 -0
- test/test_update_share_name_request.py +53 -0
- test/test_update_share_request.py +57 -0
- test/test_verify200_response.py +51 -0
- test/test_verify_request.py +51 -0
- test/test_version_inventory200_response.py +51 -0
- zrok/__init__.py +4 -0
- zrok/_version.py +21 -0
- zrok/access.py +58 -0
- zrok/decor.py +33 -0
- zrok/dialer.py +10 -0
- zrok/environment/__init__.py +1 -0
- zrok/environment/dirs.py +32 -0
- zrok/environment/root.py +182 -0
- zrok/listener.py +29 -0
- zrok/model.py +75 -0
- zrok/overview.py +77 -0
- zrok/proxy.py +203 -0
- zrok/share.py +199 -0
- zrok2_build_debugging-22.0.2000008.dist-info/METADATA +24 -0
- zrok2_build_debugging-22.0.2000008.dist-info/RECORD +213 -0
- zrok2_build_debugging-22.0.2000008.dist-info/WHEEL +5 -0
- zrok2_build_debugging-22.0.2000008.dist-info/top_level.txt +3 -0
- zrok_api/__init__.py +231 -0
- zrok_api/api/__init__.py +10 -0
- zrok_api/api/account_api.py +2261 -0
- zrok_api/api/admin_api.py +7673 -0
- zrok_api/api/agent_api.py +2547 -0
- zrok_api/api/environment_api.py +589 -0
- zrok_api/api/metadata_api.py +5614 -0
- zrok_api/api/share_api.py +3321 -0
- zrok_api/api_client.py +801 -0
- zrok_api/api_response.py +21 -0
- zrok_api/configuration.py +602 -0
- zrok_api/exceptions.py +216 -0
- zrok_api/models/__init__.py +103 -0
- zrok_api/models/access201_response.py +89 -0
- zrok_api/models/access_request.py +93 -0
- zrok_api/models/access_summary.py +105 -0
- zrok_api/models/accesses_list.py +95 -0
- zrok_api/models/add_frontend_grant_request.py +89 -0
- zrok_api/models/add_namespace_frontend_mapping_request.py +91 -0
- zrok_api/models/add_namespace_grant_request.py +89 -0
- zrok_api/models/add_organization_member_request.py +91 -0
- zrok_api/models/auth_user.py +89 -0
- zrok_api/models/change_password_request.py +91 -0
- zrok_api/models/client_version_check_request.py +87 -0
- zrok_api/models/configuration.py +97 -0
- zrok_api/models/create_frontend201_response.py +87 -0
- zrok_api/models/create_frontend_request.py +105 -0
- zrok_api/models/create_identity201_response.py +89 -0
- zrok_api/models/create_identity_request.py +87 -0
- zrok_api/models/create_namespace201_response.py +87 -0
- zrok_api/models/create_namespace_request.py +93 -0
- zrok_api/models/create_organization201_response.py +87 -0
- zrok_api/models/create_organization_request.py +87 -0
- zrok_api/models/create_share_name_request.py +89 -0
- zrok_api/models/delete_identity_request.py +87 -0
- zrok_api/models/disable_request.py +87 -0
- zrok_api/models/enable_request.py +89 -0
- zrok_api/models/enroll200_response.py +87 -0
- zrok_api/models/enroll_request.py +87 -0
- zrok_api/models/environment.py +111 -0
- zrok_api/models/environment_and_resources.py +111 -0
- zrok_api/models/environment_summary.py +105 -0
- zrok_api/models/environments_list.py +95 -0
- zrok_api/models/frontend.py +103 -0
- zrok_api/models/get_sparklines200_response.py +95 -0
- zrok_api/models/get_sparklines_request.py +91 -0
- zrok_api/models/invite_request.py +89 -0
- zrok_api/models/invite_token_generate_request.py +87 -0
- zrok_api/models/list_frontend_namespace_mappings200_response_inner.py +93 -0
- zrok_api/models/list_frontends200_response_inner.py +101 -0
- zrok_api/models/list_memberships200_response.py +95 -0
- zrok_api/models/list_memberships200_response_memberships_inner.py +91 -0
- zrok_api/models/list_namespaces200_response_inner.py +97 -0
- zrok_api/models/list_organization_members200_response.py +95 -0
- zrok_api/models/list_organization_members200_response_members_inner.py +89 -0
- zrok_api/models/list_organizations200_response.py +95 -0
- zrok_api/models/list_organizations200_response_organizations_inner.py +89 -0
- zrok_api/models/list_share_namespaces200_response_inner.py +91 -0
- zrok_api/models/login_request.py +89 -0
- zrok_api/models/metrics.py +101 -0
- zrok_api/models/metrics_sample.py +91 -0
- zrok_api/models/name.py +97 -0
- zrok_api/models/name_selection.py +89 -0
- zrok_api/models/overview.py +117 -0
- zrok_api/models/overview_names_inner.py +97 -0
- zrok_api/models/ping200_response.py +87 -0
- zrok_api/models/principal.py +95 -0
- zrok_api/models/regenerate_account_token200_response.py +87 -0
- zrok_api/models/regenerate_account_token_request.py +87 -0
- zrok_api/models/register_request.py +89 -0
- zrok_api/models/remote_access_request.py +102 -0
- zrok_api/models/remote_share200_response.py +89 -0
- zrok_api/models/remote_share_request.py +141 -0
- zrok_api/models/remote_status200_response.py +105 -0
- zrok_api/models/remote_status200_response_accesses_inner.py +101 -0
- zrok_api/models/remote_status200_response_shares_inner.py +105 -0
- zrok_api/models/remote_status200_response_shares_inner_failure.py +93 -0
- zrok_api/models/remote_unaccess_request.py +89 -0
- zrok_api/models/remote_unshare_request.py +89 -0
- zrok_api/models/remove_namespace_frontend_mapping_request.py +89 -0
- zrok_api/models/remove_organization_member_request.py +89 -0
- zrok_api/models/reset_password_request.py +89 -0
- zrok_api/models/share.py +115 -0
- zrok_api/models/share_http_healthcheck200_response.py +89 -0
- zrok_api/models/share_http_healthcheck_request.py +97 -0
- zrok_api/models/share_request.py +157 -0
- zrok_api/models/share_response.py +89 -0
- zrok_api/models/share_summary.py +105 -0
- zrok_api/models/shares_list.py +95 -0
- zrok_api/models/spark_data_sample.py +89 -0
- zrok_api/models/unaccess_request.py +91 -0
- zrok_api/models/unshare_request.py +89 -0
- zrok_api/models/update_access_request.py +91 -0
- zrok_api/models/update_frontend_request.py +95 -0
- zrok_api/models/update_namespace_request.py +95 -0
- zrok_api/models/update_share_name_request.py +91 -0
- zrok_api/models/update_share_request.py +91 -0
- zrok_api/models/verify200_response.py +87 -0
- zrok_api/models/verify_request.py +87 -0
- zrok_api/models/version_inventory200_response.py +87 -0
- zrok_api/py.typed +0 -0
- zrok_api/rest.py +258 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
zrok
|
|
5
|
+
|
|
6
|
+
zrok client access
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class RemoteShare200Response(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
RemoteShare200Response
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
token: Optional[StrictStr] = None
|
|
30
|
+
frontend_endpoints: Optional[List[StrictStr]] = Field(default=None, alias="frontendEndpoints")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["token", "frontendEndpoints"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of RemoteShare200Response from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of RemoteShare200Response from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"token": obj.get("token"),
|
|
85
|
+
"frontendEndpoints": obj.get("frontendEndpoints")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
zrok
|
|
5
|
+
|
|
6
|
+
zrok client access
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from zrok_api.models.name_selection import NameSelection
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class RemoteShareRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
RemoteShareRequest
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
env_zid: Optional[StrictStr] = Field(default=None, alias="envZId")
|
|
31
|
+
share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode")
|
|
32
|
+
token: Optional[StrictStr] = None
|
|
33
|
+
target: Optional[StrictStr] = None
|
|
34
|
+
basic_auth: Optional[List[StrictStr]] = Field(default=None, alias="basicAuth")
|
|
35
|
+
name_selections: Optional[List[NameSelection]] = Field(default=None, alias="nameSelections")
|
|
36
|
+
private_share_token: Optional[StrictStr] = Field(default=None, alias="privateShareToken")
|
|
37
|
+
backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode")
|
|
38
|
+
insecure: Optional[StrictBool] = None
|
|
39
|
+
oauth_provider: Optional[StrictStr] = Field(default=None, alias="oauthProvider")
|
|
40
|
+
oauth_email_domains: Optional[List[StrictStr]] = Field(default=None, alias="oauthEmailDomains")
|
|
41
|
+
oauth_refresh_interval: Optional[StrictStr] = Field(default=None, alias="oauthRefreshInterval")
|
|
42
|
+
open: Optional[StrictBool] = None
|
|
43
|
+
access_grants: Optional[List[StrictStr]] = Field(default=None, alias="accessGrants")
|
|
44
|
+
__properties: ClassVar[List[str]] = ["envZId", "shareMode", "token", "target", "basicAuth", "nameSelections", "privateShareToken", "backendMode", "insecure", "oauthProvider", "oauthEmailDomains", "oauthRefreshInterval", "open", "accessGrants"]
|
|
45
|
+
|
|
46
|
+
@field_validator('share_mode')
|
|
47
|
+
def share_mode_validate_enum(cls, value):
|
|
48
|
+
"""Validates the enum"""
|
|
49
|
+
if value is None:
|
|
50
|
+
return value
|
|
51
|
+
|
|
52
|
+
if value not in set(['public', 'private']):
|
|
53
|
+
raise ValueError("must be one of enum values ('public', 'private')")
|
|
54
|
+
return value
|
|
55
|
+
|
|
56
|
+
@field_validator('backend_mode')
|
|
57
|
+
def backend_mode_validate_enum(cls, value):
|
|
58
|
+
"""Validates the enum"""
|
|
59
|
+
if value is None:
|
|
60
|
+
return value
|
|
61
|
+
|
|
62
|
+
if value not in set(['proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks']):
|
|
63
|
+
raise ValueError("must be one of enum values ('proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks')")
|
|
64
|
+
return value
|
|
65
|
+
|
|
66
|
+
model_config = ConfigDict(
|
|
67
|
+
populate_by_name=True,
|
|
68
|
+
validate_assignment=True,
|
|
69
|
+
protected_namespaces=(),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def to_str(self) -> str:
|
|
74
|
+
"""Returns the string representation of the model using alias"""
|
|
75
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
76
|
+
|
|
77
|
+
def to_json(self) -> str:
|
|
78
|
+
"""Returns the JSON representation of the model using alias"""
|
|
79
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
80
|
+
return json.dumps(self.to_dict())
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of RemoteShareRequest from a JSON string"""
|
|
85
|
+
return cls.from_dict(json.loads(json_str))
|
|
86
|
+
|
|
87
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
88
|
+
"""Return the dictionary representation of the model using alias.
|
|
89
|
+
|
|
90
|
+
This has the following differences from calling pydantic's
|
|
91
|
+
`self.model_dump(by_alias=True)`:
|
|
92
|
+
|
|
93
|
+
* `None` is only added to the output dict for nullable fields that
|
|
94
|
+
were set at model initialization. Other fields with value `None`
|
|
95
|
+
are ignored.
|
|
96
|
+
"""
|
|
97
|
+
excluded_fields: Set[str] = set([
|
|
98
|
+
])
|
|
99
|
+
|
|
100
|
+
_dict = self.model_dump(
|
|
101
|
+
by_alias=True,
|
|
102
|
+
exclude=excluded_fields,
|
|
103
|
+
exclude_none=True,
|
|
104
|
+
)
|
|
105
|
+
# override the default output from pydantic by calling `to_dict()` of each item in name_selections (list)
|
|
106
|
+
_items = []
|
|
107
|
+
if self.name_selections:
|
|
108
|
+
for _item_name_selections in self.name_selections:
|
|
109
|
+
if _item_name_selections:
|
|
110
|
+
_items.append(_item_name_selections.to_dict())
|
|
111
|
+
_dict['nameSelections'] = _items
|
|
112
|
+
return _dict
|
|
113
|
+
|
|
114
|
+
@classmethod
|
|
115
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
116
|
+
"""Create an instance of RemoteShareRequest from a dict"""
|
|
117
|
+
if obj is None:
|
|
118
|
+
return None
|
|
119
|
+
|
|
120
|
+
if not isinstance(obj, dict):
|
|
121
|
+
return cls.model_validate(obj)
|
|
122
|
+
|
|
123
|
+
_obj = cls.model_validate({
|
|
124
|
+
"envZId": obj.get("envZId"),
|
|
125
|
+
"shareMode": obj.get("shareMode"),
|
|
126
|
+
"token": obj.get("token"),
|
|
127
|
+
"target": obj.get("target"),
|
|
128
|
+
"basicAuth": obj.get("basicAuth"),
|
|
129
|
+
"nameSelections": [NameSelection.from_dict(_item) for _item in obj["nameSelections"]] if obj.get("nameSelections") is not None else None,
|
|
130
|
+
"privateShareToken": obj.get("privateShareToken"),
|
|
131
|
+
"backendMode": obj.get("backendMode"),
|
|
132
|
+
"insecure": obj.get("insecure"),
|
|
133
|
+
"oauthProvider": obj.get("oauthProvider"),
|
|
134
|
+
"oauthEmailDomains": obj.get("oauthEmailDomains"),
|
|
135
|
+
"oauthRefreshInterval": obj.get("oauthRefreshInterval"),
|
|
136
|
+
"open": obj.get("open"),
|
|
137
|
+
"accessGrants": obj.get("accessGrants")
|
|
138
|
+
})
|
|
139
|
+
return _obj
|
|
140
|
+
|
|
141
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
zrok
|
|
5
|
+
|
|
6
|
+
zrok client access
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from zrok_api.models.remote_status200_response_accesses_inner import RemoteStatus200ResponseAccessesInner
|
|
23
|
+
from zrok_api.models.remote_status200_response_shares_inner import RemoteStatus200ResponseSharesInner
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class RemoteStatus200Response(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
RemoteStatus200Response
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
shares: Optional[List[RemoteStatus200ResponseSharesInner]] = None
|
|
32
|
+
accesses: Optional[List[RemoteStatus200ResponseAccessesInner]] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["shares", "accesses"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of RemoteStatus200Response from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in shares (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.shares:
|
|
77
|
+
for _item_shares in self.shares:
|
|
78
|
+
if _item_shares:
|
|
79
|
+
_items.append(_item_shares.to_dict())
|
|
80
|
+
_dict['shares'] = _items
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each item in accesses (list)
|
|
82
|
+
_items = []
|
|
83
|
+
if self.accesses:
|
|
84
|
+
for _item_accesses in self.accesses:
|
|
85
|
+
if _item_accesses:
|
|
86
|
+
_items.append(_item_accesses.to_dict())
|
|
87
|
+
_dict['accesses'] = _items
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of RemoteStatus200Response from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"shares": [RemoteStatus200ResponseSharesInner.from_dict(_item) for _item in obj["shares"]] if obj.get("shares") is not None else None,
|
|
101
|
+
"accesses": [RemoteStatus200ResponseAccessesInner.from_dict(_item) for _item in obj["accesses"]] if obj.get("accesses") is not None else None
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
zrok
|
|
5
|
+
|
|
6
|
+
zrok client access
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from zrok_api.models.remote_status200_response_shares_inner_failure import RemoteStatus200ResponseSharesInnerFailure
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class RemoteStatus200ResponseAccessesInner(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
RemoteStatus200ResponseAccessesInner
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken")
|
|
31
|
+
token: Optional[StrictStr] = None
|
|
32
|
+
bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress")
|
|
33
|
+
response_headers: Optional[List[StrictStr]] = Field(default=None, alias="responseHeaders")
|
|
34
|
+
status: Optional[StrictStr] = None
|
|
35
|
+
failure: Optional[RemoteStatus200ResponseSharesInnerFailure] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["frontendToken", "token", "bindAddress", "responseHeaders", "status", "failure"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of RemoteStatus200ResponseAccessesInner from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of failure
|
|
78
|
+
if self.failure:
|
|
79
|
+
_dict['failure'] = self.failure.to_dict()
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of RemoteStatus200ResponseAccessesInner from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"frontendToken": obj.get("frontendToken"),
|
|
93
|
+
"token": obj.get("token"),
|
|
94
|
+
"bindAddress": obj.get("bindAddress"),
|
|
95
|
+
"responseHeaders": obj.get("responseHeaders"),
|
|
96
|
+
"status": obj.get("status"),
|
|
97
|
+
"failure": RemoteStatus200ResponseSharesInnerFailure.from_dict(obj["failure"]) if obj.get("failure") is not None else None
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
zrok
|
|
5
|
+
|
|
6
|
+
zrok client access
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from zrok_api.models.remote_status200_response_shares_inner_failure import RemoteStatus200ResponseSharesInnerFailure
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class RemoteStatus200ResponseSharesInner(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
RemoteStatus200ResponseSharesInner
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
token: Optional[StrictStr] = None
|
|
31
|
+
share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode")
|
|
32
|
+
backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode")
|
|
33
|
+
frontend_endpoints: Optional[List[StrictStr]] = Field(default=None, alias="frontendEndpoints")
|
|
34
|
+
backend_endpoint: Optional[StrictStr] = Field(default=None, alias="backendEndpoint")
|
|
35
|
+
open: Optional[StrictBool] = None
|
|
36
|
+
status: Optional[StrictStr] = None
|
|
37
|
+
failure: Optional[RemoteStatus200ResponseSharesInnerFailure] = None
|
|
38
|
+
__properties: ClassVar[List[str]] = ["token", "shareMode", "backendMode", "frontendEndpoints", "backendEndpoint", "open", "status", "failure"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of RemoteStatus200ResponseSharesInner from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of failure
|
|
80
|
+
if self.failure:
|
|
81
|
+
_dict['failure'] = self.failure.to_dict()
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of RemoteStatus200ResponseSharesInner from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"token": obj.get("token"),
|
|
95
|
+
"shareMode": obj.get("shareMode"),
|
|
96
|
+
"backendMode": obj.get("backendMode"),
|
|
97
|
+
"frontendEndpoints": obj.get("frontendEndpoints"),
|
|
98
|
+
"backendEndpoint": obj.get("backendEndpoint"),
|
|
99
|
+
"open": obj.get("open"),
|
|
100
|
+
"status": obj.get("status"),
|
|
101
|
+
"failure": RemoteStatus200ResponseSharesInnerFailure.from_dict(obj["failure"]) if obj.get("failure") is not None else None
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
zrok
|
|
5
|
+
|
|
6
|
+
zrok client access
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class RemoteStatus200ResponseSharesInnerFailure(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
RemoteStatus200ResponseSharesInnerFailure
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
id: Optional[StrictStr] = None
|
|
30
|
+
count: Optional[StrictInt] = None
|
|
31
|
+
last_error: Optional[StrictStr] = Field(default=None, alias="lastError")
|
|
32
|
+
next_retry: Optional[StrictStr] = Field(default=None, alias="nextRetry")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["id", "count", "lastError", "nextRetry"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of RemoteStatus200ResponseSharesInnerFailure from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of RemoteStatus200ResponseSharesInnerFailure from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"id": obj.get("id"),
|
|
87
|
+
"count": obj.get("count"),
|
|
88
|
+
"lastError": obj.get("lastError"),
|
|
89
|
+
"nextRetry": obj.get("nextRetry")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|