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,95 @@
|
|
|
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.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ListMemberships200Response(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ListMemberships200Response
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
memberships: Optional[List[ListMemberships200ResponseMembershipsInner]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["memberships"]
|
|
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 ListMemberships200Response 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
|
+
# override the default output from pydantic by calling `to_dict()` of each item in memberships (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.memberships:
|
|
75
|
+
for _item_memberships in self.memberships:
|
|
76
|
+
if _item_memberships:
|
|
77
|
+
_items.append(_item_memberships.to_dict())
|
|
78
|
+
_dict['memberships'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of ListMemberships200Response from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"memberships": [ListMemberships200ResponseMembershipsInner.from_dict(_item) for _item in obj["memberships"]] if obj.get("memberships") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
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 typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ListMemberships200ResponseMembershipsInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ListMemberships200ResponseMembershipsInner
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken")
|
|
30
|
+
description: Optional[StrictStr] = None
|
|
31
|
+
admin: Optional[StrictBool] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["organizationToken", "description", "admin"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of ListMemberships200ResponseMembershipsInner from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of ListMemberships200ResponseMembershipsInner from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"organizationToken": obj.get("organizationToken"),
|
|
86
|
+
"description": obj.get("description"),
|
|
87
|
+
"admin": obj.get("admin")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
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, 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 ListNamespaces200ResponseInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ListNamespaces200ResponseInner
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
namespace_token: Optional[StrictStr] = Field(default=None, alias="namespaceToken")
|
|
30
|
+
name: Optional[StrictStr] = None
|
|
31
|
+
description: Optional[StrictStr] = None
|
|
32
|
+
open: Optional[StrictBool] = None
|
|
33
|
+
created_at: Optional[StrictInt] = Field(default=None, alias="createdAt")
|
|
34
|
+
updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["namespaceToken", "name", "description", "open", "createdAt", "updatedAt"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of ListNamespaces200ResponseInner from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of ListNamespaces200ResponseInner from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"namespaceToken": obj.get("namespaceToken"),
|
|
89
|
+
"name": obj.get("name"),
|
|
90
|
+
"description": obj.get("description"),
|
|
91
|
+
"open": obj.get("open"),
|
|
92
|
+
"createdAt": obj.get("createdAt"),
|
|
93
|
+
"updatedAt": obj.get("updatedAt")
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
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.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ListOrganizationMembers200Response(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ListOrganizationMembers200Response
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
members: Optional[List[ListOrganizationMembers200ResponseMembersInner]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["members"]
|
|
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 ListOrganizationMembers200Response 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
|
+
# override the default output from pydantic by calling `to_dict()` of each item in members (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.members:
|
|
75
|
+
for _item_members in self.members:
|
|
76
|
+
if _item_members:
|
|
77
|
+
_items.append(_item_members.to_dict())
|
|
78
|
+
_dict['members'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of ListOrganizationMembers200Response from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"members": [ListOrganizationMembers200ResponseMembersInner.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -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, StrictBool, 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 ListOrganizationMembers200ResponseMembersInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ListOrganizationMembers200ResponseMembersInner
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
email: Optional[StrictStr] = None
|
|
30
|
+
admin: Optional[StrictBool] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["email", "admin"]
|
|
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 ListOrganizationMembers200ResponseMembersInner 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 ListOrganizationMembers200ResponseMembersInner 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
|
+
"email": obj.get("email"),
|
|
85
|
+
"admin": obj.get("admin")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
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.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ListOrganizations200Response(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ListOrganizations200Response
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
organizations: Optional[List[ListOrganizations200ResponseOrganizationsInner]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["organizations"]
|
|
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 ListOrganizations200Response 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
|
+
# override the default output from pydantic by calling `to_dict()` of each item in organizations (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.organizations:
|
|
75
|
+
for _item_organizations in self.organizations:
|
|
76
|
+
if _item_organizations:
|
|
77
|
+
_items.append(_item_organizations.to_dict())
|
|
78
|
+
_dict['organizations'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of ListOrganizations200Response from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"organizations": [ListOrganizations200ResponseOrganizationsInner.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -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 ListOrganizations200ResponseOrganizationsInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ListOrganizations200ResponseOrganizationsInner
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken")
|
|
30
|
+
description: Optional[StrictStr] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["organizationToken", "description"]
|
|
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 ListOrganizations200ResponseOrganizationsInner 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 ListOrganizations200ResponseOrganizationsInner 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
|
+
"organizationToken": obj.get("organizationToken"),
|
|
85
|
+
"description": obj.get("description")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|