neurograph-core 1.202509071925__py3-none-any.whl → 1.202509160244__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 (67) hide show
  1. neurograph/v1/__init__.py +295 -43
  2. neurograph/v1/api/__init__.py +28 -2
  3. neurograph/v1/api/client_api.py +541 -0
  4. neurograph/v1/api/knowledge_api.py +2281 -124
  5. neurograph/v1/api/knowledge_extract_api.py +1798 -0
  6. neurograph/v1/api_client.py +4 -1
  7. neurograph/v1/models/__init__.py +215 -21
  8. neurograph/v1/models/{client_client_creat_response.py → client_client_url_row.py} +21 -25
  9. neurograph/v1/models/client_client_url_snapshot_response.py +95 -0
  10. neurograph/v1/models/{atlas_atlas_version_response.py → client_client_url_snapshot_row.py} +20 -22
  11. neurograph/v1/models/client_client_urls_response.py +3 -3
  12. neurograph/v1/models/{organizations_organization_set_atlas_response.py → client_probe.py} +22 -16
  13. neurograph/v1/models/client_probe_todo_row.py +89 -0
  14. neurograph/v1/models/client_trigger_probe_response.py +101 -0
  15. neurograph/v1/models/db_knowledge_customer.py +97 -0
  16. neurograph/v1/models/db_knowledge_order.py +177 -0
  17. neurograph/v1/models/db_knowledge_product.py +107 -0
  18. neurograph/v1/models/{atlas_atlas_version_upsert_request.py → db_knowledge_store.py} +16 -12
  19. neurograph/v1/models/knowledge_assertion.py +111 -0
  20. neurograph/v1/models/knowledge_assertion_create_request.py +103 -0
  21. neurograph/v1/models/knowledge_assertion_list_response.py +103 -0
  22. neurograph/v1/models/knowledge_assertion_query.py +99 -0
  23. neurograph/v1/models/{atlas_atlas_version_many_response.py → knowledge_assertion_response.py} +9 -13
  24. neurograph/v1/models/knowledge_customer_query.py +99 -0
  25. neurograph/v1/models/knowledge_customer_response.py +103 -0
  26. neurograph/v1/models/knowledge_enrichment_artifact.py +137 -0
  27. neurograph/v1/models/knowledge_enrichment_artifact_create_request.py +113 -0
  28. neurograph/v1/models/knowledge_enrichment_artifact_list_response.py +103 -0
  29. neurograph/v1/models/knowledge_enrichment_artifact_response.py +93 -0
  30. neurograph/v1/models/knowledge_enrichment_artifact_update_output_request.py +93 -0
  31. neurograph/v1/models/knowledge_enrichment_artifact_update_status_request.py +99 -0
  32. neurograph/v1/models/{organizations_atlas_config.py → knowledge_enrichment_query.py} +19 -17
  33. neurograph/v1/models/{knowledge_knowledge_entity.py → knowledge_entity.py} +13 -13
  34. neurograph/v1/models/{knowledge_knowledge_entity_upsert_request.py → knowledge_entity_create_request.py} +7 -7
  35. neurograph/v1/models/{knowledge_knowledge_entity_create_response.py → knowledge_entity_create_response.py} +4 -4
  36. neurograph/v1/models/{knowledge_knowledge_entity_extra.py → knowledge_entity_extra.py} +4 -4
  37. neurograph/v1/models/{knowledge_knowledge_entity_get_many_response.py → knowledge_entity_get_many_response.py} +7 -7
  38. neurograph/v1/models/{knowledge_knowledge_entity_in_db.py → knowledge_entity_in_db.py} +13 -13
  39. neurograph/v1/models/{knowledge_knowledge_entity_relations.py → knowledge_entity_relations.py} +4 -4
  40. neurograph/v1/models/{knowledge_knowledge_entity_schema.py → knowledge_entity_schema.py} +4 -4
  41. neurograph/v1/models/{knowledge_knowledge_entity_schema_row.py → knowledge_entity_schema_row.py} +4 -4
  42. neurograph/v1/models/{knowledge_knowledge_entity_schema_upsert_request.py → knowledge_entity_schema_upsert_request.py} +4 -4
  43. neurograph/v1/models/{knowledge_knowledge_entity_schemas_response.py → knowledge_entity_schemas_response.py} +7 -7
  44. neurograph/v1/models/{knowledge_knowledge_entity_schemas_upsert_response.py → knowledge_entity_schemas_upsert_response.py} +4 -4
  45. neurograph/v1/models/{knowledge_knowledge_entity_type_row.py → knowledge_entity_type_row.py} +4 -4
  46. neurograph/v1/models/{knowledge_knowledge_entity_create_request.py → knowledge_entity_upsert_request.py} +9 -11
  47. neurograph/v1/models/{knowledge_knowledge_entity_upsert_row.py → knowledge_entity_upsert_row.py} +4 -4
  48. neurograph/v1/models/{knowledge_knowledge_ingest_raw_request.py → knowledge_ingest_raw_request.py} +4 -4
  49. neurograph/v1/models/{knowledge_knowledge_ingest_raw_response.py → knowledge_ingest_raw_response.py} +4 -4
  50. neurograph/v1/models/{knowledge_knowledge_kind_response.py → knowledge_kind_response.py} +4 -4
  51. neurograph/v1/models/knowledge_order_query.py +129 -0
  52. neurograph/v1/models/knowledge_order_response.py +103 -0
  53. neurograph/v1/models/knowledge_product_query.py +101 -0
  54. neurograph/v1/models/knowledge_product_response.py +103 -0
  55. neurograph/v1/models/{client_client_create_request.py → knowledge_store_query.py} +17 -15
  56. neurograph/v1/models/knowledge_store_response.py +103 -0
  57. neurograph/v1/models/{knowledge_knowledge_type_response.py → knowledge_type_response.py} +7 -7
  58. neurograph/v1/models/{tasks_sync_from_firebase_result.py → pgtype_int8.py} +10 -8
  59. neurograph/v1/models/pgtype_text.py +89 -0
  60. {neurograph_core-1.202509071925.dist-info → neurograph_core-1.202509160244.dist-info}/METADATA +2 -1
  61. {neurograph_core-1.202509071925.dist-info → neurograph_core-1.202509160244.dist-info}/RECORD +63 -42
  62. neurograph/v1/api/atlas_api.py +0 -588
  63. neurograph/v1/api/tasks_api.py +0 -286
  64. neurograph/v1/models/atlas_atlas_version.py +0 -99
  65. neurograph/v1/models/organizations_organization_set_atlas_request.py +0 -93
  66. {neurograph_core-1.202509071925.dist-info → neurograph_core-1.202509160244.dist-info}/WHEEL +0 -0
  67. {neurograph_core-1.202509071925.dist-info → neurograph_core-1.202509160244.dist-info}/top_level.txt +0 -0
@@ -17,21 +17,23 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
24
 
25
- class AtlasAtlasVersionUpsertRequest(BaseModel):
25
+ class DbKnowledgeStore(BaseModel):
26
26
  """
27
- AtlasAtlasVersionUpsertRequest
27
+ DbKnowledgeStore
28
28
  """ # noqa: E501
29
+ client_id: Optional[StrictStr] = None
29
30
  description: Optional[StrictStr] = None
30
- id: Optional[StrictInt] = None
31
- is_active: Optional[StrictBool] = None
31
+ domain: Optional[StrictStr] = None
32
+ entity_id: Optional[StrictStr] = None
32
33
  name: Optional[StrictStr] = None
33
- version: Optional[StrictStr] = None
34
- __properties: ClassVar[List[str]] = ["description", "id", "is_active", "name", "version"]
34
+ overview: Optional[List[StrictInt]] = None
35
+ title: Optional[StrictStr] = None
36
+ __properties: ClassVar[List[str]] = ["client_id", "description", "domain", "entity_id", "name", "overview", "title"]
35
37
 
36
38
  model_config = ConfigDict(
37
39
  populate_by_name=True,
@@ -51,7 +53,7 @@ class AtlasAtlasVersionUpsertRequest(BaseModel):
51
53
 
52
54
  @classmethod
53
55
  def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of AtlasAtlasVersionUpsertRequest from a JSON string"""
56
+ """Create an instance of DbKnowledgeStore from a JSON string"""
55
57
  return cls.from_dict(json.loads(json_str))
56
58
 
57
59
  def to_dict(self) -> Dict[str, Any]:
@@ -76,7 +78,7 @@ class AtlasAtlasVersionUpsertRequest(BaseModel):
76
78
 
77
79
  @classmethod
78
80
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
- """Create an instance of AtlasAtlasVersionUpsertRequest from a dict"""
81
+ """Create an instance of DbKnowledgeStore from a dict"""
80
82
  if obj is None:
81
83
  return None
82
84
 
@@ -84,11 +86,13 @@ class AtlasAtlasVersionUpsertRequest(BaseModel):
84
86
  return cls.model_validate(obj)
85
87
 
86
88
  _obj = cls.model_validate({
89
+ "client_id": obj.get("client_id"),
87
90
  "description": obj.get("description"),
88
- "id": obj.get("id"),
89
- "is_active": obj.get("is_active"),
91
+ "domain": obj.get("domain"),
92
+ "entity_id": obj.get("entity_id"),
90
93
  "name": obj.get("name"),
91
- "version": obj.get("version")
94
+ "overview": obj.get("overview"),
95
+ "title": obj.get("title")
92
96
  })
93
97
  return _obj
94
98
 
@@ -0,0 +1,111 @@
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, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional, Union
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class KnowledgeAssertion(BaseModel):
26
+ """
27
+ KnowledgeAssertion
28
+ """ # noqa: E501
29
+ assertion_id: Optional[StrictInt] = None
30
+ client_id: Optional[StrictStr] = None
31
+ confidence: Optional[Union[StrictFloat, StrictInt]] = None
32
+ created_at: Optional[StrictStr] = None
33
+ predicate: Optional[StrictStr] = None
34
+ source_artifact_id: Optional[StrictInt] = None
35
+ source_kind: Optional[StrictStr] = None
36
+ source_ref: Optional[StrictStr] = None
37
+ status: Optional[StrictStr] = None
38
+ subject_entity_id: Optional[StrictStr] = None
39
+ valid_from: Optional[StrictStr] = None
40
+ valid_to: Optional[StrictStr] = None
41
+ value_json: Optional[Dict[str, Any]] = None
42
+ __properties: ClassVar[List[str]] = ["assertion_id", "client_id", "confidence", "created_at", "predicate", "source_artifact_id", "source_kind", "source_ref", "status", "subject_entity_id", "valid_from", "valid_to", "value_json"]
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 KnowledgeAssertion 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
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of KnowledgeAssertion from a dict"""
88
+ if obj is None:
89
+ return None
90
+
91
+ if not isinstance(obj, dict):
92
+ return cls.model_validate(obj)
93
+
94
+ _obj = cls.model_validate({
95
+ "assertion_id": obj.get("assertion_id"),
96
+ "client_id": obj.get("client_id"),
97
+ "confidence": obj.get("confidence"),
98
+ "created_at": obj.get("created_at"),
99
+ "predicate": obj.get("predicate"),
100
+ "source_artifact_id": obj.get("source_artifact_id"),
101
+ "source_kind": obj.get("source_kind"),
102
+ "source_ref": obj.get("source_ref"),
103
+ "status": obj.get("status"),
104
+ "subject_entity_id": obj.get("subject_entity_id"),
105
+ "valid_from": obj.get("valid_from"),
106
+ "valid_to": obj.get("valid_to"),
107
+ "value_json": obj.get("value_json")
108
+ })
109
+ return _obj
110
+
111
+
@@ -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, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional, Union
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class KnowledgeAssertionCreateRequest(BaseModel):
26
+ """
27
+ KnowledgeAssertionCreateRequest
28
+ """ # noqa: E501
29
+ confidence: Optional[Union[StrictFloat, StrictInt]] = None
30
+ predicate: Optional[StrictStr] = None
31
+ source_artifact_id: Optional[StrictInt] = None
32
+ source_kind: Optional[StrictStr] = None
33
+ source_ref: Optional[StrictStr] = None
34
+ subject_entity_id: Optional[StrictStr] = None
35
+ valid_from: Optional[StrictStr] = None
36
+ valid_to: Optional[StrictStr] = None
37
+ value_json: Optional[Dict[str, Any]] = None
38
+ __properties: ClassVar[List[str]] = ["confidence", "predicate", "source_artifact_id", "source_kind", "source_ref", "subject_entity_id", "valid_from", "valid_to", "value_json"]
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 KnowledgeAssertionCreateRequest 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 KnowledgeAssertionCreateRequest 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
+ "confidence": obj.get("confidence"),
92
+ "predicate": obj.get("predicate"),
93
+ "source_artifact_id": obj.get("source_artifact_id"),
94
+ "source_kind": obj.get("source_kind"),
95
+ "source_ref": obj.get("source_ref"),
96
+ "subject_entity_id": obj.get("subject_entity_id"),
97
+ "valid_from": obj.get("valid_from"),
98
+ "valid_to": obj.get("valid_to"),
99
+ "value_json": obj.get("value_json")
100
+ })
101
+ return _obj
102
+
103
+
@@ -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.knowledge_assertion import KnowledgeAssertion
23
+ from neurograph.v1.models.knowledge_assertion_query import KnowledgeAssertionQuery
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class KnowledgeAssertionListResponse(BaseModel):
28
+ """
29
+ KnowledgeAssertionListResponse
30
+ """ # noqa: E501
31
+ data: Optional[List[KnowledgeAssertion]] = None
32
+ error: Optional[StrictStr] = None
33
+ query: Optional[KnowledgeAssertionQuery] = 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 KnowledgeAssertionListResponse 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 KnowledgeAssertionListResponse 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": [KnowledgeAssertion.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
98
+ "error": obj.get("error"),
99
+ "query": KnowledgeAssertionQuery.from_dict(obj["query"]) if obj.get("query") is not None else None
100
+ })
101
+ return _obj
102
+
103
+
@@ -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, 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 KnowledgeAssertionQuery(BaseModel):
26
+ """
27
+ KnowledgeAssertionQuery
28
+ """ # noqa: E501
29
+ client_id: Optional[StrictStr] = None
30
+ limit: Optional[StrictInt] = None
31
+ offset: Optional[StrictInt] = None
32
+ predicate: Optional[StrictStr] = None
33
+ source_kind: Optional[StrictStr] = None
34
+ status: Optional[StrictStr] = None
35
+ subject_entity_id: Optional[StrictStr] = None
36
+ __properties: ClassVar[List[str]] = ["client_id", "limit", "offset", "predicate", "source_kind", "status", "subject_entity_id"]
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 KnowledgeAssertionQuery 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 KnowledgeAssertionQuery 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
+ "client_id": obj.get("client_id"),
90
+ "limit": obj.get("limit"),
91
+ "offset": obj.get("offset"),
92
+ "predicate": obj.get("predicate"),
93
+ "source_kind": obj.get("source_kind"),
94
+ "status": obj.get("status"),
95
+ "subject_entity_id": obj.get("subject_entity_id")
96
+ })
97
+ return _obj
98
+
99
+
@@ -19,15 +19,15 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from neurograph.v1.models.atlas_atlas_version import AtlasAtlasVersion
22
+ from neurograph.v1.models.knowledge_assertion import KnowledgeAssertion
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class AtlasAtlasVersionManyResponse(BaseModel):
26
+ class KnowledgeAssertionResponse(BaseModel):
27
27
  """
28
- AtlasAtlasVersionManyResponse
28
+ KnowledgeAssertionResponse
29
29
  """ # noqa: E501
30
- data: Optional[List[AtlasAtlasVersion]] = None
30
+ data: Optional[KnowledgeAssertion] = None
31
31
  error: Optional[StrictStr] = None
32
32
  __properties: ClassVar[List[str]] = ["data", "error"]
33
33
 
@@ -49,7 +49,7 @@ class AtlasAtlasVersionManyResponse(BaseModel):
49
49
 
50
50
  @classmethod
51
51
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of AtlasAtlasVersionManyResponse from a JSON string"""
52
+ """Create an instance of KnowledgeAssertionResponse from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self) -> Dict[str, Any]:
@@ -70,18 +70,14 @@ class AtlasAtlasVersionManyResponse(BaseModel):
70
70
  exclude=excluded_fields,
71
71
  exclude_none=True,
72
72
  )
73
- # override the default output from pydantic by calling `to_dict()` of each item in data (list)
74
- _items = []
73
+ # override the default output from pydantic by calling `to_dict()` of data
75
74
  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
75
+ _dict['data'] = self.data.to_dict()
80
76
  return _dict
81
77
 
82
78
  @classmethod
83
79
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
- """Create an instance of AtlasAtlasVersionManyResponse from a dict"""
80
+ """Create an instance of KnowledgeAssertionResponse from a dict"""
85
81
  if obj is None:
86
82
  return None
87
83
 
@@ -89,7 +85,7 @@ class AtlasAtlasVersionManyResponse(BaseModel):
89
85
  return cls.model_validate(obj)
90
86
 
91
87
  _obj = cls.model_validate({
92
- "data": [AtlasAtlasVersion.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
88
+ "data": KnowledgeAssertion.from_dict(obj["data"]) if obj.get("data") is not None else None,
93
89
  "error": obj.get("error")
94
90
  })
95
91
  return _obj
@@ -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, 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 KnowledgeCustomerQuery(BaseModel):
26
+ """
27
+ KnowledgeCustomerQuery
28
+ """ # noqa: E501
29
+ client_id: Optional[StrictStr] = None
30
+ email: Optional[StrictStr] = None
31
+ first_name: Optional[StrictStr] = None
32
+ last_name: Optional[StrictStr] = None
33
+ limit: Optional[StrictInt] = None
34
+ offset: Optional[StrictInt] = None
35
+ phone: Optional[StrictStr] = None
36
+ __properties: ClassVar[List[str]] = ["client_id", "email", "first_name", "last_name", "limit", "offset", "phone"]
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 KnowledgeCustomerQuery 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 KnowledgeCustomerQuery 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
+ "client_id": obj.get("client_id"),
90
+ "email": obj.get("email"),
91
+ "first_name": obj.get("first_name"),
92
+ "last_name": obj.get("last_name"),
93
+ "limit": obj.get("limit"),
94
+ "offset": obj.get("offset"),
95
+ "phone": obj.get("phone")
96
+ })
97
+ return _obj
98
+
99
+