neurograph-core 1.202508221357__py3-none-any.whl → 1.202509152210__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 +315 -5
- neurograph/v1/api/__init__.py +29 -2
- neurograph/v1/api/client_api.py +541 -0
- neurograph/v1/api/dagster_api.py +271 -2
- neurograph/v1/api/knowledge_api.py +4426 -0
- neurograph/v1/api/knowledge_extract_api.py +1798 -0
- neurograph/v1/api/persona_api.py +263 -2
- neurograph/v1/api_client.py +4 -1
- neurograph/v1/models/__init__.py +224 -2
- neurograph/v1/models/{client_client_create_request.py → client_client_info.py} +11 -7
- neurograph/v1/models/client_client_metadata_response.py +14 -2
- neurograph/v1/models/{client_client_creat_response.py → client_client_url_row.py} +21 -25
- neurograph/v1/models/client_client_url_snapshot_response.py +95 -0
- neurograph/v1/models/client_client_url_snapshot_row.py +99 -0
- neurograph/v1/models/client_client_urls_response.py +3 -3
- neurograph/v1/models/client_organization_brand.py +107 -0
- neurograph/v1/models/client_organization_detail.py +115 -0
- neurograph/v1/models/client_probe.py +105 -0
- neurograph/v1/models/client_probe_todo_row.py +89 -0
- neurograph/v1/models/client_trigger_probe_response.py +101 -0
- neurograph/v1/models/client_workbench_config.py +99 -0
- neurograph/v1/models/dagster_dagster_info.py +95 -0
- neurograph/v1/models/{atlas_atlas_version_many_response.py → dagster_dagster_log_get_response.py} +7 -7
- neurograph/v1/models/db_knowledge_customer.py +97 -0
- neurograph/v1/models/db_knowledge_order.py +177 -0
- neurograph/v1/models/db_knowledge_product.py +107 -0
- neurograph/v1/models/db_knowledge_store.py +99 -0
- neurograph/v1/models/knowledge_assertion.py +111 -0
- neurograph/v1/models/knowledge_assertion_create_request.py +103 -0
- neurograph/v1/models/knowledge_assertion_list_response.py +103 -0
- neurograph/v1/models/knowledge_assertion_query.py +99 -0
- neurograph/v1/models/knowledge_assertion_response.py +93 -0
- neurograph/v1/models/knowledge_customer_query.py +99 -0
- neurograph/v1/models/knowledge_customer_response.py +103 -0
- neurograph/v1/models/knowledge_enrichment_artifact.py +137 -0
- neurograph/v1/models/knowledge_enrichment_artifact_create_request.py +113 -0
- neurograph/v1/models/knowledge_enrichment_artifact_list_response.py +103 -0
- neurograph/v1/models/knowledge_enrichment_artifact_response.py +93 -0
- neurograph/v1/models/knowledge_enrichment_artifact_update_output_request.py +93 -0
- neurograph/v1/models/knowledge_enrichment_artifact_update_status_request.py +99 -0
- neurograph/v1/models/knowledge_enrichment_query.py +99 -0
- neurograph/v1/models/knowledge_entity.py +115 -0
- neurograph/v1/models/knowledge_entity_create_request.py +95 -0
- neurograph/v1/models/knowledge_entity_create_response.py +99 -0
- neurograph/v1/models/knowledge_entity_extra.py +91 -0
- neurograph/v1/models/knowledge_entity_get_many_response.py +103 -0
- neurograph/v1/models/knowledge_entity_in_db.py +117 -0
- neurograph/v1/models/knowledge_entity_relations.py +91 -0
- neurograph/v1/models/knowledge_entity_schema.py +89 -0
- neurograph/v1/models/{atlas_atlas_version_response.py → knowledge_entity_schema_row.py} +16 -18
- neurograph/v1/models/{organizations_organization_set_atlas_response.py → knowledge_entity_schema_upsert_request.py} +14 -16
- neurograph/v1/models/knowledge_entity_schemas_response.py +97 -0
- neurograph/v1/models/{atlas_atlas_version.py → knowledge_entity_schemas_upsert_response.py} +11 -15
- neurograph/v1/models/{organizations_atlas_config.py → knowledge_entity_type_row.py} +14 -14
- neurograph/v1/models/knowledge_entity_upsert_request.py +95 -0
- neurograph/v1/models/{atlas_atlas_version_upsert_request.py → knowledge_entity_upsert_row.py} +10 -12
- neurograph/v1/models/knowledge_err_entity_row.py +89 -0
- neurograph/v1/models/knowledge_ingest_raw_request.py +95 -0
- neurograph/v1/models/knowledge_ingest_raw_response.py +101 -0
- neurograph/v1/models/knowledge_ingest_raw_row.py +97 -0
- neurograph/v1/models/{tasks_sync_from_firebase_result.py → knowledge_kind_response.py} +8 -6
- neurograph/v1/models/knowledge_order_query.py +129 -0
- neurograph/v1/models/knowledge_order_response.py +103 -0
- neurograph/v1/models/knowledge_product_query.py +101 -0
- neurograph/v1/models/knowledge_product_response.py +103 -0
- neurograph/v1/models/knowledge_query.py +95 -0
- neurograph/v1/models/knowledge_store_query.py +97 -0
- neurograph/v1/models/knowledge_store_response.py +103 -0
- neurograph/v1/models/knowledge_type_response.py +97 -0
- neurograph/v1/models/{organizations_organization_set_atlas_request.py → pgtype_int8.py} +10 -14
- neurograph/v1/models/pgtype_text.py +89 -0
- {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509152210.dist-info}/METADATA +2 -1
- {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509152210.dist-info}/RECORD +75 -25
- neurograph/v1/api/atlas_api.py +0 -588
- neurograph/v1/api/tasks_api.py +0 -286
- {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509152210.dist-info}/WHEEL +0 -0
- {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509152210.dist-info}/top_level.txt +0 -0
|
@@ -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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from neurograph.v1.models.db_knowledge_order import DbKnowledgeOrder
|
|
23
|
+
from neurograph.v1.models.knowledge_order_query import KnowledgeOrderQuery
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class KnowledgeOrderResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
KnowledgeOrderResponse
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
data: Optional[List[DbKnowledgeOrder]] = None
|
|
32
|
+
error: Optional[StrictStr] = None
|
|
33
|
+
query: Optional[KnowledgeOrderQuery] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "error", "query"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of KnowledgeOrderResponse from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
|
76
|
+
_items = []
|
|
77
|
+
if self.data:
|
|
78
|
+
for _item_data in self.data:
|
|
79
|
+
if _item_data:
|
|
80
|
+
_items.append(_item_data.to_dict())
|
|
81
|
+
_dict['data'] = _items
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of query
|
|
83
|
+
if self.query:
|
|
84
|
+
_dict['query'] = self.query.to_dict()
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of KnowledgeOrderResponse from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"data": [DbKnowledgeOrder.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
|
98
|
+
"error": obj.get("error"),
|
|
99
|
+
"query": KnowledgeOrderQuery.from_dict(obj["query"]) if obj.get("query") is not None else None
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
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 KnowledgeProductQuery(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
KnowledgeProductQuery
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
client_id: Optional[StrictStr] = None
|
|
30
|
+
handle: Optional[StrictStr] = None
|
|
31
|
+
limit: Optional[StrictInt] = None
|
|
32
|
+
offset: Optional[StrictInt] = None
|
|
33
|
+
product_hash: Optional[StrictStr] = None
|
|
34
|
+
product_id: Optional[StrictInt] = None
|
|
35
|
+
title: Optional[StrictStr] = None
|
|
36
|
+
type: Optional[StrictStr] = None
|
|
37
|
+
__properties: ClassVar[List[str]] = ["client_id", "handle", "limit", "offset", "product_hash", "product_id", "title", "type"]
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of KnowledgeProductQuery from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
|
+
"""Create an instance of KnowledgeProductQuery from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return cls.model_validate(obj)
|
|
88
|
+
|
|
89
|
+
_obj = cls.model_validate({
|
|
90
|
+
"client_id": obj.get("client_id"),
|
|
91
|
+
"handle": obj.get("handle"),
|
|
92
|
+
"limit": obj.get("limit"),
|
|
93
|
+
"offset": obj.get("offset"),
|
|
94
|
+
"product_hash": obj.get("product_hash"),
|
|
95
|
+
"product_id": obj.get("product_id"),
|
|
96
|
+
"title": obj.get("title"),
|
|
97
|
+
"type": obj.get("type")
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from neurograph.v1.models.db_knowledge_product import DbKnowledgeProduct
|
|
23
|
+
from neurograph.v1.models.knowledge_product_query import KnowledgeProductQuery
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class KnowledgeProductResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
KnowledgeProductResponse
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
data: Optional[List[DbKnowledgeProduct]] = None
|
|
32
|
+
error: Optional[StrictStr] = None
|
|
33
|
+
query: Optional[KnowledgeProductQuery] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "error", "query"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of KnowledgeProductResponse from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
|
76
|
+
_items = []
|
|
77
|
+
if self.data:
|
|
78
|
+
for _item_data in self.data:
|
|
79
|
+
if _item_data:
|
|
80
|
+
_items.append(_item_data.to_dict())
|
|
81
|
+
_dict['data'] = _items
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of query
|
|
83
|
+
if self.query:
|
|
84
|
+
_dict['query'] = self.query.to_dict()
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of KnowledgeProductResponse from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"data": [DbKnowledgeProduct.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
|
98
|
+
"error": obj.get("error"),
|
|
99
|
+
"query": KnowledgeProductQuery.from_dict(obj["query"]) if obj.get("query") is not None else None
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
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, 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 KnowledgeQuery(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
KnowledgeQuery
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
client_id: Optional[StrictStr] = Field(default=None, alias="clientId")
|
|
30
|
+
kind: Optional[StrictStr] = None
|
|
31
|
+
limit: Optional[StrictInt] = None
|
|
32
|
+
offset: Optional[StrictInt] = None
|
|
33
|
+
schema_id: Optional[StrictStr] = Field(default=None, alias="schemaId")
|
|
34
|
+
__properties: ClassVar[List[str]] = ["clientId", "kind", "limit", "offset", "schemaId"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of KnowledgeQuery from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of KnowledgeQuery from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"clientId": obj.get("clientId"),
|
|
88
|
+
"kind": obj.get("kind"),
|
|
89
|
+
"limit": obj.get("limit"),
|
|
90
|
+
"offset": obj.get("offset"),
|
|
91
|
+
"schemaId": obj.get("schemaId")
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
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, 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 KnowledgeStoreQuery(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
KnowledgeStoreQuery
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
client_id: Optional[StrictStr] = Field(default=None, description="required")
|
|
30
|
+
domain: Optional[StrictStr] = Field(default=None, description="prefix ILIKE")
|
|
31
|
+
limit: Optional[StrictInt] = None
|
|
32
|
+
name: Optional[StrictStr] = Field(default=None, description="prefix ILIKE")
|
|
33
|
+
offset: Optional[StrictInt] = None
|
|
34
|
+
title: Optional[StrictStr] = Field(default=None, description="prefix ILIKE")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["client_id", "domain", "limit", "name", "offset", "title"]
|
|
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 KnowledgeStoreQuery 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 KnowledgeStoreQuery 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
|
+
"client_id": obj.get("client_id"),
|
|
89
|
+
"domain": obj.get("domain"),
|
|
90
|
+
"limit": obj.get("limit"),
|
|
91
|
+
"name": obj.get("name"),
|
|
92
|
+
"offset": obj.get("offset"),
|
|
93
|
+
"title": obj.get("title")
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from neurograph.v1.models.db_knowledge_store import DbKnowledgeStore
|
|
23
|
+
from neurograph.v1.models.knowledge_store_query import KnowledgeStoreQuery
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class KnowledgeStoreResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
KnowledgeStoreResponse
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
data: Optional[List[DbKnowledgeStore]] = None
|
|
32
|
+
error: Optional[StrictStr] = None
|
|
33
|
+
query: Optional[KnowledgeStoreQuery] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "error", "query"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of KnowledgeStoreResponse from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
|
76
|
+
_items = []
|
|
77
|
+
if self.data:
|
|
78
|
+
for _item_data in self.data:
|
|
79
|
+
if _item_data:
|
|
80
|
+
_items.append(_item_data.to_dict())
|
|
81
|
+
_dict['data'] = _items
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of query
|
|
83
|
+
if self.query:
|
|
84
|
+
_dict['query'] = self.query.to_dict()
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of KnowledgeStoreResponse from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"data": [DbKnowledgeStore.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
|
98
|
+
"error": obj.get("error"),
|
|
99
|
+
"query": KnowledgeStoreQuery.from_dict(obj["query"]) if obj.get("query") is not None else None
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|