neurograph-core 1.202508201827__py3-none-any.whl → 1.202509071925__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.
Files changed (42) hide show
  1. neurograph/v1/__init__.py +58 -0
  2. neurograph/v1/api/__init__.py +1 -0
  3. neurograph/v1/api/dagster_api.py +271 -2
  4. neurograph/v1/api/knowledge_api.py +2269 -0
  5. neurograph/v1/api/persona_api.py +263 -2
  6. neurograph/v1/models/__init__.py +28 -0
  7. neurograph/v1/models/client_client_info.py +99 -0
  8. neurograph/v1/models/client_client_metadata_response.py +14 -2
  9. neurograph/v1/models/client_client_url_upsert_request.py +7 -11
  10. neurograph/v1/models/client_client_url_upsert_response.py +5 -5
  11. neurograph/v1/models/client_organization_brand.py +107 -0
  12. neurograph/v1/models/client_organization_detail.py +115 -0
  13. neurograph/v1/models/client_workbench_config.py +99 -0
  14. neurograph/v1/models/dagster_dagster_info.py +95 -0
  15. neurograph/v1/models/dagster_dagster_log_get_response.py +97 -0
  16. neurograph/v1/models/db_client_url.py +5 -16
  17. neurograph/v1/models/knowledge_err_entity_row.py +89 -0
  18. neurograph/v1/models/knowledge_ingest_raw_row.py +97 -0
  19. neurograph/v1/models/knowledge_knowledge_entity.py +115 -0
  20. neurograph/v1/models/knowledge_knowledge_entity_create_request.py +97 -0
  21. neurograph/v1/models/knowledge_knowledge_entity_create_response.py +99 -0
  22. neurograph/v1/models/knowledge_knowledge_entity_extra.py +91 -0
  23. neurograph/v1/models/knowledge_knowledge_entity_get_many_response.py +103 -0
  24. neurograph/v1/models/knowledge_knowledge_entity_in_db.py +117 -0
  25. neurograph/v1/models/knowledge_knowledge_entity_relations.py +91 -0
  26. neurograph/v1/models/knowledge_knowledge_entity_schema.py +89 -0
  27. neurograph/v1/models/knowledge_knowledge_entity_schema_row.py +99 -0
  28. neurograph/v1/models/knowledge_knowledge_entity_schema_upsert_request.py +97 -0
  29. neurograph/v1/models/knowledge_knowledge_entity_schemas_response.py +97 -0
  30. neurograph/v1/models/knowledge_knowledge_entity_schemas_upsert_response.py +95 -0
  31. neurograph/v1/models/knowledge_knowledge_entity_type_row.py +97 -0
  32. neurograph/v1/models/knowledge_knowledge_entity_upsert_request.py +95 -0
  33. neurograph/v1/models/knowledge_knowledge_entity_upsert_row.py +93 -0
  34. neurograph/v1/models/knowledge_knowledge_ingest_raw_request.py +95 -0
  35. neurograph/v1/models/knowledge_knowledge_ingest_raw_response.py +101 -0
  36. neurograph/v1/models/knowledge_knowledge_kind_response.py +89 -0
  37. neurograph/v1/models/knowledge_knowledge_type_response.py +97 -0
  38. neurograph/v1/models/knowledge_query.py +95 -0
  39. {neurograph_core-1.202508201827.dist-info → neurograph_core-1.202509071925.dist-info}/METADATA +1 -1
  40. {neurograph_core-1.202508201827.dist-info → neurograph_core-1.202509071925.dist-info}/RECORD +42 -13
  41. {neurograph_core-1.202508201827.dist-info → neurograph_core-1.202509071925.dist-info}/WHEEL +0 -0
  42. {neurograph_core-1.202508201827.dist-info → neurograph_core-1.202509071925.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,115 @@
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, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from neurograph.v1.models.client_organization_brand import ClientOrganizationBrand
23
+ from neurograph.v1.models.client_workbench_config import ClientWorkbenchConfig
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ClientOrganizationDetail(BaseModel):
28
+ """
29
+ ClientOrganizationDetail
30
+ """ # noqa: E501
31
+ branding: Optional[ClientOrganizationBrand] = 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
+ ts_created: Optional[StrictInt] = None
38
+ ts_updated: Optional[StrictInt] = None
39
+ uid: Optional[StrictStr] = None
40
+ url: Optional[StrictStr] = None
41
+ workbench: Optional[ClientWorkbenchConfig] = None
42
+ __properties: ClassVar[List[str]] = ["branding", "description", "id", "image_url", "is_active", "name", "ts_created", "ts_updated", "uid", "url", "workbench"]
43
+
44
+ model_config = ConfigDict(
45
+ populate_by_name=True,
46
+ validate_assignment=True,
47
+ protected_namespaces=(),
48
+ )
49
+
50
+
51
+ def to_str(self) -> str:
52
+ """Returns the string representation of the model using alias"""
53
+ return pprint.pformat(self.model_dump(by_alias=True))
54
+
55
+ def to_json(self) -> str:
56
+ """Returns the JSON representation of the model using alias"""
57
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
58
+ return json.dumps(self.to_dict())
59
+
60
+ @classmethod
61
+ def from_json(cls, json_str: str) -> Optional[Self]:
62
+ """Create an instance of ClientOrganizationDetail from a JSON string"""
63
+ return cls.from_dict(json.loads(json_str))
64
+
65
+ def to_dict(self) -> Dict[str, Any]:
66
+ """Return the dictionary representation of the model using alias.
67
+
68
+ This has the following differences from calling pydantic's
69
+ `self.model_dump(by_alias=True)`:
70
+
71
+ * `None` is only added to the output dict for nullable fields that
72
+ were set at model initialization. Other fields with value `None`
73
+ are ignored.
74
+ """
75
+ excluded_fields: Set[str] = set([
76
+ ])
77
+
78
+ _dict = self.model_dump(
79
+ by_alias=True,
80
+ exclude=excluded_fields,
81
+ exclude_none=True,
82
+ )
83
+ # override the default output from pydantic by calling `to_dict()` of branding
84
+ if self.branding:
85
+ _dict['branding'] = self.branding.to_dict()
86
+ # override the default output from pydantic by calling `to_dict()` of workbench
87
+ if self.workbench:
88
+ _dict['workbench'] = self.workbench.to_dict()
89
+ return _dict
90
+
91
+ @classmethod
92
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
+ """Create an instance of ClientOrganizationDetail from a dict"""
94
+ if obj is None:
95
+ return None
96
+
97
+ if not isinstance(obj, dict):
98
+ return cls.model_validate(obj)
99
+
100
+ _obj = cls.model_validate({
101
+ "branding": ClientOrganizationBrand.from_dict(obj["branding"]) if obj.get("branding") is not None else None,
102
+ "description": obj.get("description"),
103
+ "id": obj.get("id"),
104
+ "image_url": obj.get("image_url"),
105
+ "is_active": obj.get("is_active"),
106
+ "name": obj.get("name"),
107
+ "ts_created": obj.get("ts_created"),
108
+ "ts_updated": obj.get("ts_updated"),
109
+ "uid": obj.get("uid"),
110
+ "url": obj.get("url"),
111
+ "workbench": ClientWorkbenchConfig.from_dict(obj["workbench"]) if obj.get("workbench") is not None else None
112
+ })
113
+ return _obj
114
+
115
+
@@ -0,0 +1,99 @@
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 typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ClientWorkbenchConfig(BaseModel):
26
+ """
27
+ ClientWorkbenchConfig
28
+ """ # noqa: E501
29
+ description: Optional[StrictStr] = None
30
+ org_id: Optional[StrictStr] = None
31
+ version: Optional[StrictStr] = None
32
+ version_name: Optional[StrictStr] = None
33
+ workbench_is_active: Optional[StrictBool] = None
34
+ workbench_url: Optional[StrictStr] = None
35
+ workbench_url_ext: Optional[StrictStr] = None
36
+ __properties: ClassVar[List[str]] = ["description", "org_id", "version", "version_name", "workbench_is_active", "workbench_url", "workbench_url_ext"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of ClientWorkbenchConfig from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of ClientWorkbenchConfig from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "description": obj.get("description"),
90
+ "org_id": obj.get("org_id"),
91
+ "version": obj.get("version"),
92
+ "version_name": obj.get("version_name"),
93
+ "workbench_is_active": obj.get("workbench_is_active"),
94
+ "workbench_url": obj.get("workbench_url"),
95
+ "workbench_url_ext": obj.get("workbench_url_ext")
96
+ })
97
+ return _obj
98
+
99
+
@@ -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, 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 DagsterDagsterInfo(BaseModel):
26
+ """
27
+ DagsterDagsterInfo
28
+ """ # noqa: E501
29
+ id: Optional[StrictStr] = None
30
+ job: Optional[StrictStr] = None
31
+ optional: Optional[StrictStr] = None
32
+ run: Optional[StrictStr] = None
33
+ ts_created: Optional[StrictInt] = None
34
+ __properties: ClassVar[List[str]] = ["id", "job", "optional", "run", "ts_created"]
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 DagsterDagsterInfo 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 DagsterDagsterInfo 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
+ "id": obj.get("id"),
88
+ "job": obj.get("job"),
89
+ "optional": obj.get("optional"),
90
+ "run": obj.get("run"),
91
+ "ts_created": obj.get("ts_created")
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, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from neurograph.v1.models.dagster_dagster_info import DagsterDagsterInfo
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class DagsterDagsterLogGetResponse(BaseModel):
27
+ """
28
+ DagsterDagsterLogGetResponse
29
+ """ # noqa: E501
30
+ data: Optional[List[DagsterDagsterInfo]] = None
31
+ error: Optional[StrictStr] = None
32
+ __properties: ClassVar[List[str]] = ["data", "error"]
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 DagsterDagsterLogGetResponse 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
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
74
+ _items = []
75
+ if self.data:
76
+ for _item_data in self.data:
77
+ if _item_data:
78
+ _items.append(_item_data.to_dict())
79
+ _dict['data'] = _items
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of DagsterDagsterLogGetResponse from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "data": [DagsterDagsterInfo.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
93
+ "error": obj.get("error")
94
+ })
95
+ return _obj
96
+
97
+
@@ -17,9 +17,8 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from neurograph.v1.models.pgtype_timestamp import PgtypeTimestamp
23
22
  from typing import Optional, Set
24
23
  from typing_extensions import Self
25
24
 
@@ -28,13 +27,11 @@ class DbClientUrl(BaseModel):
28
27
  DbClientUrl
29
28
  """ # noqa: E501
30
29
  client_id: Optional[StrictStr] = None
31
- environment: Optional[StrictStr] = None
32
- id: Optional[StrictStr] = None
30
+ customer_environment: Optional[StrictStr] = None
31
+ id: Optional[StrictInt] = None
33
32
  is_active: Optional[StrictBool] = None
34
- ts_created: Optional[PgtypeTimestamp] = None
35
- ts_updated: Optional[PgtypeTimestamp] = None
36
33
  url: Optional[StrictStr] = None
37
- __properties: ClassVar[List[str]] = ["client_id", "environment", "id", "is_active", "ts_created", "ts_updated", "url"]
34
+ __properties: ClassVar[List[str]] = ["client_id", "customer_environment", "id", "is_active", "url"]
38
35
 
39
36
  model_config = ConfigDict(
40
37
  populate_by_name=True,
@@ -75,12 +72,6 @@ class DbClientUrl(BaseModel):
75
72
  exclude=excluded_fields,
76
73
  exclude_none=True,
77
74
  )
78
- # override the default output from pydantic by calling `to_dict()` of ts_created
79
- if self.ts_created:
80
- _dict['ts_created'] = self.ts_created.to_dict()
81
- # override the default output from pydantic by calling `to_dict()` of ts_updated
82
- if self.ts_updated:
83
- _dict['ts_updated'] = self.ts_updated.to_dict()
84
75
  return _dict
85
76
 
86
77
  @classmethod
@@ -94,11 +85,9 @@ class DbClientUrl(BaseModel):
94
85
 
95
86
  _obj = cls.model_validate({
96
87
  "client_id": obj.get("client_id"),
97
- "environment": obj.get("environment"),
88
+ "customer_environment": obj.get("customer_environment"),
98
89
  "id": obj.get("id"),
99
90
  "is_active": obj.get("is_active"),
100
- "ts_created": PgtypeTimestamp.from_dict(obj["ts_created"]) if obj.get("ts_created") is not None else None,
101
- "ts_updated": PgtypeTimestamp.from_dict(obj["ts_updated"]) if obj.get("ts_updated") is not None else None,
102
91
  "url": obj.get("url")
103
92
  })
104
93
  return _obj
@@ -0,0 +1,89 @@
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 KnowledgeErrEntityRow(BaseModel):
26
+ """
27
+ KnowledgeErrEntityRow
28
+ """ # noqa: E501
29
+ error: Optional[StrictStr] = None
30
+ index: Optional[StrictInt] = None
31
+ __properties: ClassVar[List[str]] = ["error", "index"]
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 KnowledgeErrEntityRow 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 KnowledgeErrEntityRow 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
+ "error": obj.get("error"),
85
+ "index": obj.get("index")
86
+ })
87
+ return _obj
88
+
89
+
@@ -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, 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 KnowledgeIngestRawRow(BaseModel):
26
+ """
27
+ KnowledgeIngestRawRow
28
+ """ # noqa: E501
29
+ client_id: Optional[StrictStr] = None
30
+ payload: Optional[Dict[str, Any]] = None
31
+ payload_hash: Optional[StrictStr] = None
32
+ source_collection: Optional[StrictStr] = None
33
+ source_ref_id: Optional[StrictStr] = None
34
+ source_schema: Optional[StrictStr] = None
35
+ __properties: ClassVar[List[str]] = ["client_id", "payload", "payload_hash", "source_collection", "source_ref_id", "source_schema"]
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 KnowledgeIngestRawRow 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 KnowledgeIngestRawRow 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
+ "payload": obj.get("payload"),
90
+ "payload_hash": obj.get("payload_hash"),
91
+ "source_collection": obj.get("source_collection"),
92
+ "source_ref_id": obj.get("source_ref_id"),
93
+ "source_schema": obj.get("source_schema")
94
+ })
95
+ return _obj
96
+
97
+