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.
Files changed (77) hide show
  1. neurograph/v1/__init__.py +315 -5
  2. neurograph/v1/api/__init__.py +29 -2
  3. neurograph/v1/api/client_api.py +541 -0
  4. neurograph/v1/api/dagster_api.py +271 -2
  5. neurograph/v1/api/knowledge_api.py +4426 -0
  6. neurograph/v1/api/knowledge_extract_api.py +1798 -0
  7. neurograph/v1/api/persona_api.py +263 -2
  8. neurograph/v1/api_client.py +4 -1
  9. neurograph/v1/models/__init__.py +224 -2
  10. neurograph/v1/models/{client_client_create_request.py → client_client_info.py} +11 -7
  11. neurograph/v1/models/client_client_metadata_response.py +14 -2
  12. neurograph/v1/models/{client_client_creat_response.py → client_client_url_row.py} +21 -25
  13. neurograph/v1/models/client_client_url_snapshot_response.py +95 -0
  14. neurograph/v1/models/client_client_url_snapshot_row.py +99 -0
  15. neurograph/v1/models/client_client_urls_response.py +3 -3
  16. neurograph/v1/models/client_organization_brand.py +107 -0
  17. neurograph/v1/models/client_organization_detail.py +115 -0
  18. neurograph/v1/models/client_probe.py +105 -0
  19. neurograph/v1/models/client_probe_todo_row.py +89 -0
  20. neurograph/v1/models/client_trigger_probe_response.py +101 -0
  21. neurograph/v1/models/client_workbench_config.py +99 -0
  22. neurograph/v1/models/dagster_dagster_info.py +95 -0
  23. neurograph/v1/models/{atlas_atlas_version_many_response.py → dagster_dagster_log_get_response.py} +7 -7
  24. neurograph/v1/models/db_knowledge_customer.py +97 -0
  25. neurograph/v1/models/db_knowledge_order.py +177 -0
  26. neurograph/v1/models/db_knowledge_product.py +107 -0
  27. neurograph/v1/models/db_knowledge_store.py +99 -0
  28. neurograph/v1/models/knowledge_assertion.py +111 -0
  29. neurograph/v1/models/knowledge_assertion_create_request.py +103 -0
  30. neurograph/v1/models/knowledge_assertion_list_response.py +103 -0
  31. neurograph/v1/models/knowledge_assertion_query.py +99 -0
  32. neurograph/v1/models/knowledge_assertion_response.py +93 -0
  33. neurograph/v1/models/knowledge_customer_query.py +99 -0
  34. neurograph/v1/models/knowledge_customer_response.py +103 -0
  35. neurograph/v1/models/knowledge_enrichment_artifact.py +137 -0
  36. neurograph/v1/models/knowledge_enrichment_artifact_create_request.py +113 -0
  37. neurograph/v1/models/knowledge_enrichment_artifact_list_response.py +103 -0
  38. neurograph/v1/models/knowledge_enrichment_artifact_response.py +93 -0
  39. neurograph/v1/models/knowledge_enrichment_artifact_update_output_request.py +93 -0
  40. neurograph/v1/models/knowledge_enrichment_artifact_update_status_request.py +99 -0
  41. neurograph/v1/models/knowledge_enrichment_query.py +99 -0
  42. neurograph/v1/models/knowledge_entity.py +115 -0
  43. neurograph/v1/models/knowledge_entity_create_request.py +95 -0
  44. neurograph/v1/models/knowledge_entity_create_response.py +99 -0
  45. neurograph/v1/models/knowledge_entity_extra.py +91 -0
  46. neurograph/v1/models/knowledge_entity_get_many_response.py +103 -0
  47. neurograph/v1/models/knowledge_entity_in_db.py +117 -0
  48. neurograph/v1/models/knowledge_entity_relations.py +91 -0
  49. neurograph/v1/models/knowledge_entity_schema.py +89 -0
  50. neurograph/v1/models/{atlas_atlas_version_response.py → knowledge_entity_schema_row.py} +16 -18
  51. neurograph/v1/models/{organizations_organization_set_atlas_response.py → knowledge_entity_schema_upsert_request.py} +14 -16
  52. neurograph/v1/models/knowledge_entity_schemas_response.py +97 -0
  53. neurograph/v1/models/{atlas_atlas_version.py → knowledge_entity_schemas_upsert_response.py} +11 -15
  54. neurograph/v1/models/{organizations_atlas_config.py → knowledge_entity_type_row.py} +14 -14
  55. neurograph/v1/models/knowledge_entity_upsert_request.py +95 -0
  56. neurograph/v1/models/{atlas_atlas_version_upsert_request.py → knowledge_entity_upsert_row.py} +10 -12
  57. neurograph/v1/models/knowledge_err_entity_row.py +89 -0
  58. neurograph/v1/models/knowledge_ingest_raw_request.py +95 -0
  59. neurograph/v1/models/knowledge_ingest_raw_response.py +101 -0
  60. neurograph/v1/models/knowledge_ingest_raw_row.py +97 -0
  61. neurograph/v1/models/{tasks_sync_from_firebase_result.py → knowledge_kind_response.py} +8 -6
  62. neurograph/v1/models/knowledge_order_query.py +129 -0
  63. neurograph/v1/models/knowledge_order_response.py +103 -0
  64. neurograph/v1/models/knowledge_product_query.py +101 -0
  65. neurograph/v1/models/knowledge_product_response.py +103 -0
  66. neurograph/v1/models/knowledge_query.py +95 -0
  67. neurograph/v1/models/knowledge_store_query.py +97 -0
  68. neurograph/v1/models/knowledge_store_response.py +103 -0
  69. neurograph/v1/models/knowledge_type_response.py +97 -0
  70. neurograph/v1/models/{organizations_organization_set_atlas_request.py → pgtype_int8.py} +10 -14
  71. neurograph/v1/models/pgtype_text.py +89 -0
  72. {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509152210.dist-info}/METADATA +2 -1
  73. {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509152210.dist-info}/RECORD +75 -25
  74. neurograph/v1/api/atlas_api.py +0 -588
  75. neurograph/v1/api/tasks_api.py +0 -286
  76. {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509152210.dist-info}/WHEEL +0 -0
  77. {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.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
+
@@ -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, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from neurograph.v1.models.knowledge_assertion import KnowledgeAssertion
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class KnowledgeAssertionResponse(BaseModel):
27
+ """
28
+ KnowledgeAssertionResponse
29
+ """ # noqa: E501
30
+ data: Optional[KnowledgeAssertion] = 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 KnowledgeAssertionResponse 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 data
74
+ if self.data:
75
+ _dict['data'] = self.data.to_dict()
76
+ return _dict
77
+
78
+ @classmethod
79
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
+ """Create an instance of KnowledgeAssertionResponse 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
+ "data": KnowledgeAssertion.from_dict(obj["data"]) if obj.get("data") is not None else None,
89
+ "error": obj.get("error")
90
+ })
91
+ return _obj
92
+
93
+
@@ -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
+
@@ -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_customer import DbKnowledgeCustomer
23
+ from neurograph.v1.models.knowledge_customer_query import KnowledgeCustomerQuery
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class KnowledgeCustomerResponse(BaseModel):
28
+ """
29
+ KnowledgeCustomerResponse
30
+ """ # noqa: E501
31
+ data: Optional[List[DbKnowledgeCustomer]] = None
32
+ error: Optional[StrictStr] = None
33
+ query: Optional[KnowledgeCustomerQuery] = 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 KnowledgeCustomerResponse 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 KnowledgeCustomerResponse 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": [DbKnowledgeCustomer.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
98
+ "error": obj.get("error"),
99
+ "query": KnowledgeCustomerQuery.from_dict(obj["query"]) if obj.get("query") is not None else None
100
+ })
101
+ return _obj
102
+
103
+
@@ -0,0 +1,137 @@
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, 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 KnowledgeEnrichmentArtifact(BaseModel):
26
+ """
27
+ KnowledgeEnrichmentArtifact
28
+ """ # noqa: E501
29
+ agent_engine_run_id: Optional[StrictStr] = None
30
+ artifact_id: Optional[StrictInt] = None
31
+ attempt_count: Optional[StrictInt] = None
32
+ client_id: Optional[StrictStr] = None
33
+ cloud_run_execution_id: Optional[StrictStr] = None
34
+ cloud_run_job_name: Optional[StrictStr] = None
35
+ completed_at: Optional[StrictStr] = None
36
+ confidence: Optional[Union[StrictFloat, StrictInt]] = None
37
+ config_entity_id: Optional[StrictStr] = None
38
+ config_snapshot: Optional[Dict[str, Any]] = None
39
+ created_at: Optional[StrictStr] = None
40
+ input_params: Optional[Dict[str, Any]] = None
41
+ is_current: Optional[StrictBool] = None
42
+ job_name: Optional[StrictStr] = None
43
+ last_error: Optional[StrictStr] = None
44
+ output_json: Optional[Dict[str, Any]] = None
45
+ output_schema_id: Optional[StrictStr] = None
46
+ output_text: Optional[StrictStr] = None
47
+ queued_at: Optional[StrictStr] = None
48
+ spec_version: Optional[StrictInt] = None
49
+ started_at: Optional[StrictStr] = None
50
+ status: Optional[StrictStr] = None
51
+ subject_entity_id: Optional[StrictStr] = None
52
+ supersedes_artifact_id: Optional[StrictInt] = None
53
+ task_name: Optional[StrictStr] = None
54
+ task_queue_name: Optional[StrictStr] = None
55
+ __properties: ClassVar[List[str]] = ["agent_engine_run_id", "artifact_id", "attempt_count", "client_id", "cloud_run_execution_id", "cloud_run_job_name", "completed_at", "confidence", "config_entity_id", "config_snapshot", "created_at", "input_params", "is_current", "job_name", "last_error", "output_json", "output_schema_id", "output_text", "queued_at", "spec_version", "started_at", "status", "subject_entity_id", "supersedes_artifact_id", "task_name", "task_queue_name"]
56
+
57
+ model_config = ConfigDict(
58
+ populate_by_name=True,
59
+ validate_assignment=True,
60
+ protected_namespaces=(),
61
+ )
62
+
63
+
64
+ def to_str(self) -> str:
65
+ """Returns the string representation of the model using alias"""
66
+ return pprint.pformat(self.model_dump(by_alias=True))
67
+
68
+ def to_json(self) -> str:
69
+ """Returns the JSON representation of the model using alias"""
70
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
71
+ return json.dumps(self.to_dict())
72
+
73
+ @classmethod
74
+ def from_json(cls, json_str: str) -> Optional[Self]:
75
+ """Create an instance of KnowledgeEnrichmentArtifact from a JSON string"""
76
+ return cls.from_dict(json.loads(json_str))
77
+
78
+ def to_dict(self) -> Dict[str, Any]:
79
+ """Return the dictionary representation of the model using alias.
80
+
81
+ This has the following differences from calling pydantic's
82
+ `self.model_dump(by_alias=True)`:
83
+
84
+ * `None` is only added to the output dict for nullable fields that
85
+ were set at model initialization. Other fields with value `None`
86
+ are ignored.
87
+ """
88
+ excluded_fields: Set[str] = set([
89
+ ])
90
+
91
+ _dict = self.model_dump(
92
+ by_alias=True,
93
+ exclude=excluded_fields,
94
+ exclude_none=True,
95
+ )
96
+ return _dict
97
+
98
+ @classmethod
99
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
100
+ """Create an instance of KnowledgeEnrichmentArtifact from a dict"""
101
+ if obj is None:
102
+ return None
103
+
104
+ if not isinstance(obj, dict):
105
+ return cls.model_validate(obj)
106
+
107
+ _obj = cls.model_validate({
108
+ "agent_engine_run_id": obj.get("agent_engine_run_id"),
109
+ "artifact_id": obj.get("artifact_id"),
110
+ "attempt_count": obj.get("attempt_count"),
111
+ "client_id": obj.get("client_id"),
112
+ "cloud_run_execution_id": obj.get("cloud_run_execution_id"),
113
+ "cloud_run_job_name": obj.get("cloud_run_job_name"),
114
+ "completed_at": obj.get("completed_at"),
115
+ "confidence": obj.get("confidence"),
116
+ "config_entity_id": obj.get("config_entity_id"),
117
+ "config_snapshot": obj.get("config_snapshot"),
118
+ "created_at": obj.get("created_at"),
119
+ "input_params": obj.get("input_params"),
120
+ "is_current": obj.get("is_current"),
121
+ "job_name": obj.get("job_name"),
122
+ "last_error": obj.get("last_error"),
123
+ "output_json": obj.get("output_json"),
124
+ "output_schema_id": obj.get("output_schema_id"),
125
+ "output_text": obj.get("output_text"),
126
+ "queued_at": obj.get("queued_at"),
127
+ "spec_version": obj.get("spec_version"),
128
+ "started_at": obj.get("started_at"),
129
+ "status": obj.get("status"),
130
+ "subject_entity_id": obj.get("subject_entity_id"),
131
+ "supersedes_artifact_id": obj.get("supersedes_artifact_id"),
132
+ "task_name": obj.get("task_name"),
133
+ "task_queue_name": obj.get("task_queue_name")
134
+ })
135
+ return _obj
136
+
137
+