neurograph-core 1.202509252137__py3-none-any.whl → 1.202510040107__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.
- neurograph/v1/__init__.py +63 -198
- neurograph/v1/api/__init__.py +4 -27
- neurograph/v1/api/admin_api.py +1123 -0
- neurograph/v1/api/client_api.py +263 -0
- neurograph/v1/api/dagster_api.py +2 -1
- neurograph/v1/api/knowledge_api.py +296 -0
- neurograph/v1/api/knowledge_extract_api.py +1 -1
- neurograph/v1/api/lookup_api.py +279 -27
- neurograph/v1/api/organization_api.py +128 -137
- neurograph/v1/api/persona_api.py +2 -1
- neurograph/v1/api/reporting_api.py +300 -0
- neurograph/v1/api/user_api.py +282 -0
- neurograph/v1/api_client.py +4 -4
- neurograph/v1/models/__init__.py +29 -170
- neurograph/v1/models/admin_permission_response.py +95 -0
- neurograph/v1/models/admin_set_permission_request.py +91 -0
- neurograph/v1/models/admin_upsert_user_request.py +91 -0
- neurograph/v1/models/admin_upsert_user_response.py +99 -0
- neurograph/v1/models/admin_user.py +97 -0
- neurograph/v1/models/admin_user_detail_response.py +121 -0
- neurograph/v1/models/admin_users_get_many_response.py +97 -0
- neurograph/v1/models/admin_users_org_response.py +97 -0
- neurograph/v1/models/db_account_organization_brand.py +109 -0
- neurograph/v1/models/db_my_client.py +99 -0
- neurograph/v1/models/db_my_org.py +121 -0
- neurograph/v1/models/db_user_client_role.py +93 -0
- neurograph/v1/models/db_user_in_db.py +127 -0
- neurograph/v1/models/db_user_org_role.py +93 -0
- neurograph/v1/models/db_user_role.py +91 -0
- neurograph/v1/models/knowledge_enrichment_artifact_create_request.py +3 -1
- neurograph/v1/models/knowledge_enrichment_query.py +3 -1
- neurograph/v1/models/knowledge_product.py +103 -0
- neurograph/v1/models/knowledge_product_upsert_request.py +95 -0
- neurograph/v1/models/knowledge_product_upsert_response.py +99 -0
- neurograph/v1/models/lookup_env.py +89 -0
- neurograph/v1/models/{lookup_lookup_language_response.py → lookup_language_response.py} +4 -4
- neurograph/v1/models/lookup_lookup_environments_response.py +97 -0
- neurograph/v1/models/lookup_role.py +89 -0
- neurograph/v1/models/lookup_roles_response.py +97 -0
- neurograph/v1/models/{lookup_lookup_state_response.py → lookup_states_response.py} +4 -4
- neurograph/v1/models/me_my_profile_response.py +115 -0
- neurograph/v1/models/reporting_daily_metric.py +95 -0
- neurograph/v1/models/reporting_daily_metrics_response.py +97 -0
- neurograph/v1/models/reporting_query.py +91 -0
- {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/METADATA +2 -3
- {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/RECORD +48 -19
- {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/WHEEL +0 -0
- {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Neurograph Core
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.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 neurograph.v1.models.db_account_organization_brand import DbAccountOrganizationBrand
|
|
23
|
+
from neurograph.v1.models.db_user_org_role import DbUserOrgRole
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class DbMyOrg(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
DbMyOrg
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
brand: Optional[DbAccountOrganizationBrand] = None
|
|
32
|
+
description: Optional[StrictStr] = None
|
|
33
|
+
id: Optional[StrictStr] = None
|
|
34
|
+
image_url: Optional[StrictStr] = None
|
|
35
|
+
is_active: Optional[StrictBool] = None
|
|
36
|
+
name: Optional[StrictStr] = None
|
|
37
|
+
roles: Optional[List[DbUserOrgRole]] = None
|
|
38
|
+
url: Optional[StrictStr] = None
|
|
39
|
+
workbench_is_active: Optional[StrictBool] = None
|
|
40
|
+
workbench_url: Optional[StrictStr] = None
|
|
41
|
+
workbench_url_ext: Optional[StrictStr] = None
|
|
42
|
+
workbench_version_id: Optional[StrictStr] = None
|
|
43
|
+
__properties: ClassVar[List[str]] = ["brand", "description", "id", "image_url", "is_active", "name", "roles", "url", "workbench_is_active", "workbench_url", "workbench_url_ext", "workbench_version_id"]
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
populate_by_name=True,
|
|
47
|
+
validate_assignment=True,
|
|
48
|
+
protected_namespaces=(),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def to_str(self) -> str:
|
|
53
|
+
"""Returns the string representation of the model using alias"""
|
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
+
|
|
56
|
+
def to_json(self) -> str:
|
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
+
return json.dumps(self.to_dict())
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of DbMyOrg from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
|
68
|
+
|
|
69
|
+
This has the following differences from calling pydantic's
|
|
70
|
+
`self.model_dump(by_alias=True)`:
|
|
71
|
+
|
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
|
73
|
+
were set at model initialization. Other fields with value `None`
|
|
74
|
+
are ignored.
|
|
75
|
+
"""
|
|
76
|
+
excluded_fields: Set[str] = set([
|
|
77
|
+
])
|
|
78
|
+
|
|
79
|
+
_dict = self.model_dump(
|
|
80
|
+
by_alias=True,
|
|
81
|
+
exclude=excluded_fields,
|
|
82
|
+
exclude_none=True,
|
|
83
|
+
)
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of brand
|
|
85
|
+
if self.brand:
|
|
86
|
+
_dict['brand'] = self.brand.to_dict()
|
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
|
|
88
|
+
_items = []
|
|
89
|
+
if self.roles:
|
|
90
|
+
for _item_roles in self.roles:
|
|
91
|
+
if _item_roles:
|
|
92
|
+
_items.append(_item_roles.to_dict())
|
|
93
|
+
_dict['roles'] = _items
|
|
94
|
+
return _dict
|
|
95
|
+
|
|
96
|
+
@classmethod
|
|
97
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
98
|
+
"""Create an instance of DbMyOrg from a dict"""
|
|
99
|
+
if obj is None:
|
|
100
|
+
return None
|
|
101
|
+
|
|
102
|
+
if not isinstance(obj, dict):
|
|
103
|
+
return cls.model_validate(obj)
|
|
104
|
+
|
|
105
|
+
_obj = cls.model_validate({
|
|
106
|
+
"brand": DbAccountOrganizationBrand.from_dict(obj["brand"]) if obj.get("brand") is not None else None,
|
|
107
|
+
"description": obj.get("description"),
|
|
108
|
+
"id": obj.get("id"),
|
|
109
|
+
"image_url": obj.get("image_url"),
|
|
110
|
+
"is_active": obj.get("is_active"),
|
|
111
|
+
"name": obj.get("name"),
|
|
112
|
+
"roles": [DbUserOrgRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
|
|
113
|
+
"url": obj.get("url"),
|
|
114
|
+
"workbench_is_active": obj.get("workbench_is_active"),
|
|
115
|
+
"workbench_url": obj.get("workbench_url"),
|
|
116
|
+
"workbench_url_ext": obj.get("workbench_url_ext"),
|
|
117
|
+
"workbench_version_id": obj.get("workbench_version_id")
|
|
118
|
+
})
|
|
119
|
+
return _obj
|
|
120
|
+
|
|
121
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Neurograph Core
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.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, 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 DbUserClientRole(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DbUserClientRole
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
client_id: Optional[StrictStr] = None
|
|
30
|
+
id: Optional[StrictInt] = None
|
|
31
|
+
role_name: Optional[StrictStr] = None
|
|
32
|
+
ts_created: Optional[StrictInt] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["client_id", "id", "role_name", "ts_created"]
|
|
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 DbUserClientRole 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 DbUserClientRole 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
|
+
"client_id": obj.get("client_id"),
|
|
87
|
+
"id": obj.get("id"),
|
|
88
|
+
"role_name": obj.get("role_name"),
|
|
89
|
+
"ts_created": obj.get("ts_created")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Neurograph Core
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.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, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from neurograph.v1.models.db_user_client_role import DbUserClientRole
|
|
23
|
+
from neurograph.v1.models.db_user_org_role import DbUserOrgRole
|
|
24
|
+
from neurograph.v1.models.db_user_role import DbUserRole
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class DbUserInDb(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
DbUserInDb
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
client_roles: Optional[List[DbUserClientRole]] = None
|
|
33
|
+
display_name: Optional[StrictStr] = None
|
|
34
|
+
email: Optional[StrictStr] = None
|
|
35
|
+
firebase_uid: Optional[StrictStr] = None
|
|
36
|
+
id: Optional[StrictInt] = None
|
|
37
|
+
org_roles: Optional[List[DbUserOrgRole]] = None
|
|
38
|
+
roles: Optional[List[DbUserRole]] = None
|
|
39
|
+
ts_created: Optional[StrictInt] = None
|
|
40
|
+
ts_updated: Optional[StrictInt] = None
|
|
41
|
+
__properties: ClassVar[List[str]] = ["client_roles", "display_name", "email", "firebase_uid", "id", "org_roles", "roles", "ts_created", "ts_updated"]
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
populate_by_name=True,
|
|
45
|
+
validate_assignment=True,
|
|
46
|
+
protected_namespaces=(),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
+
"""Create an instance of DbUserInDb from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
|
66
|
+
|
|
67
|
+
This has the following differences from calling pydantic's
|
|
68
|
+
`self.model_dump(by_alias=True)`:
|
|
69
|
+
|
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
|
71
|
+
were set at model initialization. Other fields with value `None`
|
|
72
|
+
are ignored.
|
|
73
|
+
"""
|
|
74
|
+
excluded_fields: Set[str] = set([
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of each item in client_roles (list)
|
|
83
|
+
_items = []
|
|
84
|
+
if self.client_roles:
|
|
85
|
+
for _item_client_roles in self.client_roles:
|
|
86
|
+
if _item_client_roles:
|
|
87
|
+
_items.append(_item_client_roles.to_dict())
|
|
88
|
+
_dict['client_roles'] = _items
|
|
89
|
+
# override the default output from pydantic by calling `to_dict()` of each item in org_roles (list)
|
|
90
|
+
_items = []
|
|
91
|
+
if self.org_roles:
|
|
92
|
+
for _item_org_roles in self.org_roles:
|
|
93
|
+
if _item_org_roles:
|
|
94
|
+
_items.append(_item_org_roles.to_dict())
|
|
95
|
+
_dict['org_roles'] = _items
|
|
96
|
+
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
|
|
97
|
+
_items = []
|
|
98
|
+
if self.roles:
|
|
99
|
+
for _item_roles in self.roles:
|
|
100
|
+
if _item_roles:
|
|
101
|
+
_items.append(_item_roles.to_dict())
|
|
102
|
+
_dict['roles'] = _items
|
|
103
|
+
return _dict
|
|
104
|
+
|
|
105
|
+
@classmethod
|
|
106
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
107
|
+
"""Create an instance of DbUserInDb from a dict"""
|
|
108
|
+
if obj is None:
|
|
109
|
+
return None
|
|
110
|
+
|
|
111
|
+
if not isinstance(obj, dict):
|
|
112
|
+
return cls.model_validate(obj)
|
|
113
|
+
|
|
114
|
+
_obj = cls.model_validate({
|
|
115
|
+
"client_roles": [DbUserClientRole.from_dict(_item) for _item in obj["client_roles"]] if obj.get("client_roles") is not None else None,
|
|
116
|
+
"display_name": obj.get("display_name"),
|
|
117
|
+
"email": obj.get("email"),
|
|
118
|
+
"firebase_uid": obj.get("firebase_uid"),
|
|
119
|
+
"id": obj.get("id"),
|
|
120
|
+
"org_roles": [DbUserOrgRole.from_dict(_item) for _item in obj["org_roles"]] if obj.get("org_roles") is not None else None,
|
|
121
|
+
"roles": [DbUserRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
|
|
122
|
+
"ts_created": obj.get("ts_created"),
|
|
123
|
+
"ts_updated": obj.get("ts_updated")
|
|
124
|
+
})
|
|
125
|
+
return _obj
|
|
126
|
+
|
|
127
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Neurograph Core
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.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, 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 DbUserOrgRole(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DbUserOrgRole
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
id: Optional[StrictInt] = None
|
|
30
|
+
org_id: Optional[StrictStr] = None
|
|
31
|
+
role_name: Optional[StrictStr] = None
|
|
32
|
+
ts_created: Optional[StrictInt] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["id", "org_id", "role_name", "ts_created"]
|
|
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 DbUserOrgRole 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 DbUserOrgRole 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
|
+
"org_id": obj.get("org_id"),
|
|
88
|
+
"role_name": obj.get("role_name"),
|
|
89
|
+
"ts_created": obj.get("ts_created")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Neurograph Core
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.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, 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 DbUserRole(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DbUserRole
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
id: Optional[StrictInt] = None
|
|
30
|
+
role_name: Optional[StrictStr] = None
|
|
31
|
+
ts_created: Optional[StrictInt] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["id", "role_name", "ts_created"]
|
|
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 DbUserRole 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 DbUserRole 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
|
+
"id": obj.get("id"),
|
|
86
|
+
"role_name": obj.get("role_name"),
|
|
87
|
+
"ts_created": obj.get("ts_created")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -32,6 +32,7 @@ class KnowledgeEnrichmentArtifactCreateRequest(BaseModel):
|
|
|
32
32
|
config_snapshot: Optional[Dict[str, Any]] = None
|
|
33
33
|
input_params: Optional[Dict[str, Any]] = None
|
|
34
34
|
job_name: Optional[StrictStr] = None
|
|
35
|
+
kind: Optional[StrictStr] = None
|
|
35
36
|
output_json: Optional[Dict[str, Any]] = None
|
|
36
37
|
output_schema_id: Optional[StrictStr] = None
|
|
37
38
|
output_text: Optional[StrictStr] = None
|
|
@@ -40,7 +41,7 @@ class KnowledgeEnrichmentArtifactCreateRequest(BaseModel):
|
|
|
40
41
|
supersedes_artifact_id: Optional[StrictInt] = None
|
|
41
42
|
task_name: Optional[StrictStr] = None
|
|
42
43
|
task_queue_name: Optional[StrictStr] = None
|
|
43
|
-
__properties: ClassVar[List[str]] = ["cloud_run_job_name", "confidence", "config_entity_id", "config_snapshot", "input_params", "job_name", "output_json", "output_schema_id", "output_text", "spec_version", "subject_entity_id", "supersedes_artifact_id", "task_name", "task_queue_name"]
|
|
44
|
+
__properties: ClassVar[List[str]] = ["cloud_run_job_name", "confidence", "config_entity_id", "config_snapshot", "input_params", "job_name", "kind", "output_json", "output_schema_id", "output_text", "spec_version", "subject_entity_id", "supersedes_artifact_id", "task_name", "task_queue_name"]
|
|
44
45
|
|
|
45
46
|
model_config = ConfigDict(
|
|
46
47
|
populate_by_name=True,
|
|
@@ -99,6 +100,7 @@ class KnowledgeEnrichmentArtifactCreateRequest(BaseModel):
|
|
|
99
100
|
"config_snapshot": obj.get("config_snapshot"),
|
|
100
101
|
"input_params": obj.get("input_params"),
|
|
101
102
|
"job_name": obj.get("job_name"),
|
|
103
|
+
"kind": obj.get("kind"),
|
|
102
104
|
"output_json": obj.get("output_json"),
|
|
103
105
|
"output_schema_id": obj.get("output_schema_id"),
|
|
104
106
|
"output_text": obj.get("output_text"),
|
|
@@ -29,11 +29,12 @@ class KnowledgeEnrichmentQuery(BaseModel):
|
|
|
29
29
|
client_id: Optional[StrictStr] = None
|
|
30
30
|
is_current: Optional[StrictBool] = None
|
|
31
31
|
job_name: Optional[StrictStr] = None
|
|
32
|
+
kind: Optional[StrictStr] = None
|
|
32
33
|
limit: Optional[StrictInt] = None
|
|
33
34
|
offset: Optional[StrictInt] = None
|
|
34
35
|
status: Optional[StrictStr] = None
|
|
35
36
|
subject_entity_id: Optional[StrictStr] = None
|
|
36
|
-
__properties: ClassVar[List[str]] = ["client_id", "is_current", "job_name", "limit", "offset", "status", "subject_entity_id"]
|
|
37
|
+
__properties: ClassVar[List[str]] = ["client_id", "is_current", "job_name", "kind", "limit", "offset", "status", "subject_entity_id"]
|
|
37
38
|
|
|
38
39
|
model_config = ConfigDict(
|
|
39
40
|
populate_by_name=True,
|
|
@@ -89,6 +90,7 @@ class KnowledgeEnrichmentQuery(BaseModel):
|
|
|
89
90
|
"client_id": obj.get("client_id"),
|
|
90
91
|
"is_current": obj.get("is_current"),
|
|
91
92
|
"job_name": obj.get("job_name"),
|
|
93
|
+
"kind": obj.get("kind"),
|
|
92
94
|
"limit": obj.get("limit"),
|
|
93
95
|
"offset": obj.get("offset"),
|
|
94
96
|
"status": obj.get("status"),
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Neurograph Core
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.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, 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 KnowledgeProduct(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
KnowledgeProduct
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
client_id: Optional[StrictStr] = None
|
|
30
|
+
entity_id: Optional[StrictStr] = None
|
|
31
|
+
handle: Optional[StrictStr] = None
|
|
32
|
+
overview: Optional[StrictStr] = None
|
|
33
|
+
product_hash: Optional[StrictStr] = None
|
|
34
|
+
product_id: Optional[StrictInt] = None
|
|
35
|
+
summary: Optional[StrictStr] = None
|
|
36
|
+
title: Optional[StrictStr] = None
|
|
37
|
+
type: Optional[StrictStr] = None
|
|
38
|
+
__properties: ClassVar[List[str]] = ["client_id", "entity_id", "handle", "overview", "product_hash", "product_id", "summary", "title", "type"]
|
|
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 KnowledgeProduct 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
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of KnowledgeProduct 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
|
+
"client_id": obj.get("client_id"),
|
|
92
|
+
"entity_id": obj.get("entity_id"),
|
|
93
|
+
"handle": obj.get("handle"),
|
|
94
|
+
"overview": obj.get("overview"),
|
|
95
|
+
"product_hash": obj.get("product_hash"),
|
|
96
|
+
"product_id": obj.get("product_id"),
|
|
97
|
+
"summary": obj.get("summary"),
|
|
98
|
+
"title": obj.get("title"),
|
|
99
|
+
"type": obj.get("type")
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|