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,177 @@
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 neurograph.v1.models.pgtype_text import PgtypeText
23
+ from neurograph.v1.models.pgtype_timestamp import PgtypeTimestamp
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class DbKnowledgeOrder(BaseModel):
28
+ """
29
+ DbKnowledgeOrder
30
+ """ # noqa: E501
31
+ billing_address_hash: Optional[PgtypeText] = None
32
+ billing_address_json: Optional[List[StrictInt]] = None
33
+ cancelled_at: Optional[PgtypeTimestamp] = None
34
+ channel: Optional[StrictStr] = None
35
+ client_id: Optional[StrictStr] = None
36
+ closed_at: Optional[PgtypeTimestamp] = None
37
+ currency: Optional[StrictStr] = None
38
+ customer_entity_id: Optional[PgtypeText] = None
39
+ discount_amount: Optional[Union[StrictFloat, StrictInt]] = None
40
+ email_at_order: Optional[PgtypeText] = None
41
+ entity_id: Optional[StrictStr] = None
42
+ ext_order_id: Optional[PgtypeText] = None
43
+ ext_order_number: Optional[PgtypeText] = None
44
+ ext_store_id: Optional[PgtypeText] = None
45
+ financial_status: Optional[StrictStr] = None
46
+ fulfillment_status: Optional[StrictStr] = None
47
+ phone_at_order: Optional[PgtypeText] = None
48
+ placed_at: Optional[PgtypeTimestamp] = None
49
+ shipping_address_hash: Optional[PgtypeText] = None
50
+ shipping_address_json: Optional[List[StrictInt]] = None
51
+ shipping_amount: Optional[Union[StrictFloat, StrictInt]] = None
52
+ source_name: Optional[StrictStr] = None
53
+ status: Optional[StrictStr] = None
54
+ store_entity_id: Optional[PgtypeText] = None
55
+ subtotal_amount: Optional[Union[StrictFloat, StrictInt]] = None
56
+ tax_amount: Optional[Union[StrictFloat, StrictInt]] = None
57
+ total_amount: Optional[Union[StrictFloat, StrictInt]] = None
58
+ __properties: ClassVar[List[str]] = ["billing_address_hash", "billing_address_json", "cancelled_at", "channel", "client_id", "closed_at", "currency", "customer_entity_id", "discount_amount", "email_at_order", "entity_id", "ext_order_id", "ext_order_number", "ext_store_id", "financial_status", "fulfillment_status", "phone_at_order", "placed_at", "shipping_address_hash", "shipping_address_json", "shipping_amount", "source_name", "status", "store_entity_id", "subtotal_amount", "tax_amount", "total_amount"]
59
+
60
+ model_config = ConfigDict(
61
+ populate_by_name=True,
62
+ validate_assignment=True,
63
+ protected_namespaces=(),
64
+ )
65
+
66
+
67
+ def to_str(self) -> str:
68
+ """Returns the string representation of the model using alias"""
69
+ return pprint.pformat(self.model_dump(by_alias=True))
70
+
71
+ def to_json(self) -> str:
72
+ """Returns the JSON representation of the model using alias"""
73
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
74
+ return json.dumps(self.to_dict())
75
+
76
+ @classmethod
77
+ def from_json(cls, json_str: str) -> Optional[Self]:
78
+ """Create an instance of DbKnowledgeOrder from a JSON string"""
79
+ return cls.from_dict(json.loads(json_str))
80
+
81
+ def to_dict(self) -> Dict[str, Any]:
82
+ """Return the dictionary representation of the model using alias.
83
+
84
+ This has the following differences from calling pydantic's
85
+ `self.model_dump(by_alias=True)`:
86
+
87
+ * `None` is only added to the output dict for nullable fields that
88
+ were set at model initialization. Other fields with value `None`
89
+ are ignored.
90
+ """
91
+ excluded_fields: Set[str] = set([
92
+ ])
93
+
94
+ _dict = self.model_dump(
95
+ by_alias=True,
96
+ exclude=excluded_fields,
97
+ exclude_none=True,
98
+ )
99
+ # override the default output from pydantic by calling `to_dict()` of billing_address_hash
100
+ if self.billing_address_hash:
101
+ _dict['billing_address_hash'] = self.billing_address_hash.to_dict()
102
+ # override the default output from pydantic by calling `to_dict()` of cancelled_at
103
+ if self.cancelled_at:
104
+ _dict['cancelled_at'] = self.cancelled_at.to_dict()
105
+ # override the default output from pydantic by calling `to_dict()` of closed_at
106
+ if self.closed_at:
107
+ _dict['closed_at'] = self.closed_at.to_dict()
108
+ # override the default output from pydantic by calling `to_dict()` of customer_entity_id
109
+ if self.customer_entity_id:
110
+ _dict['customer_entity_id'] = self.customer_entity_id.to_dict()
111
+ # override the default output from pydantic by calling `to_dict()` of email_at_order
112
+ if self.email_at_order:
113
+ _dict['email_at_order'] = self.email_at_order.to_dict()
114
+ # override the default output from pydantic by calling `to_dict()` of ext_order_id
115
+ if self.ext_order_id:
116
+ _dict['ext_order_id'] = self.ext_order_id.to_dict()
117
+ # override the default output from pydantic by calling `to_dict()` of ext_order_number
118
+ if self.ext_order_number:
119
+ _dict['ext_order_number'] = self.ext_order_number.to_dict()
120
+ # override the default output from pydantic by calling `to_dict()` of ext_store_id
121
+ if self.ext_store_id:
122
+ _dict['ext_store_id'] = self.ext_store_id.to_dict()
123
+ # override the default output from pydantic by calling `to_dict()` of phone_at_order
124
+ if self.phone_at_order:
125
+ _dict['phone_at_order'] = self.phone_at_order.to_dict()
126
+ # override the default output from pydantic by calling `to_dict()` of placed_at
127
+ if self.placed_at:
128
+ _dict['placed_at'] = self.placed_at.to_dict()
129
+ # override the default output from pydantic by calling `to_dict()` of shipping_address_hash
130
+ if self.shipping_address_hash:
131
+ _dict['shipping_address_hash'] = self.shipping_address_hash.to_dict()
132
+ # override the default output from pydantic by calling `to_dict()` of store_entity_id
133
+ if self.store_entity_id:
134
+ _dict['store_entity_id'] = self.store_entity_id.to_dict()
135
+ return _dict
136
+
137
+ @classmethod
138
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
139
+ """Create an instance of DbKnowledgeOrder from a dict"""
140
+ if obj is None:
141
+ return None
142
+
143
+ if not isinstance(obj, dict):
144
+ return cls.model_validate(obj)
145
+
146
+ _obj = cls.model_validate({
147
+ "billing_address_hash": PgtypeText.from_dict(obj["billing_address_hash"]) if obj.get("billing_address_hash") is not None else None,
148
+ "billing_address_json": obj.get("billing_address_json"),
149
+ "cancelled_at": PgtypeTimestamp.from_dict(obj["cancelled_at"]) if obj.get("cancelled_at") is not None else None,
150
+ "channel": obj.get("channel"),
151
+ "client_id": obj.get("client_id"),
152
+ "closed_at": PgtypeTimestamp.from_dict(obj["closed_at"]) if obj.get("closed_at") is not None else None,
153
+ "currency": obj.get("currency"),
154
+ "customer_entity_id": PgtypeText.from_dict(obj["customer_entity_id"]) if obj.get("customer_entity_id") is not None else None,
155
+ "discount_amount": obj.get("discount_amount"),
156
+ "email_at_order": PgtypeText.from_dict(obj["email_at_order"]) if obj.get("email_at_order") is not None else None,
157
+ "entity_id": obj.get("entity_id"),
158
+ "ext_order_id": PgtypeText.from_dict(obj["ext_order_id"]) if obj.get("ext_order_id") is not None else None,
159
+ "ext_order_number": PgtypeText.from_dict(obj["ext_order_number"]) if obj.get("ext_order_number") is not None else None,
160
+ "ext_store_id": PgtypeText.from_dict(obj["ext_store_id"]) if obj.get("ext_store_id") is not None else None,
161
+ "financial_status": obj.get("financial_status"),
162
+ "fulfillment_status": obj.get("fulfillment_status"),
163
+ "phone_at_order": PgtypeText.from_dict(obj["phone_at_order"]) if obj.get("phone_at_order") is not None else None,
164
+ "placed_at": PgtypeTimestamp.from_dict(obj["placed_at"]) if obj.get("placed_at") is not None else None,
165
+ "shipping_address_hash": PgtypeText.from_dict(obj["shipping_address_hash"]) if obj.get("shipping_address_hash") is not None else None,
166
+ "shipping_address_json": obj.get("shipping_address_json"),
167
+ "shipping_amount": obj.get("shipping_amount"),
168
+ "source_name": obj.get("source_name"),
169
+ "status": obj.get("status"),
170
+ "store_entity_id": PgtypeText.from_dict(obj["store_entity_id"]) if obj.get("store_entity_id") is not None else None,
171
+ "subtotal_amount": obj.get("subtotal_amount"),
172
+ "tax_amount": obj.get("tax_amount"),
173
+ "total_amount": obj.get("total_amount")
174
+ })
175
+ return _obj
176
+
177
+
@@ -0,0 +1,107 @@
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.pgtype_int8 import PgtypeInt8
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class DbKnowledgeProduct(BaseModel):
27
+ """
28
+ DbKnowledgeProduct
29
+ """ # noqa: E501
30
+ client_id: Optional[StrictStr] = None
31
+ entity_id: Optional[StrictStr] = None
32
+ handle: Optional[StrictStr] = None
33
+ overview: Optional[StrictStr] = None
34
+ product_hash: Optional[StrictStr] = None
35
+ product_id: Optional[PgtypeInt8] = None
36
+ summary: Optional[StrictStr] = None
37
+ title: Optional[StrictStr] = None
38
+ type: Optional[StrictStr] = None
39
+ __properties: ClassVar[List[str]] = ["client_id", "entity_id", "handle", "overview", "product_hash", "product_id", "summary", "title", "type"]
40
+
41
+ model_config = ConfigDict(
42
+ populate_by_name=True,
43
+ validate_assignment=True,
44
+ protected_namespaces=(),
45
+ )
46
+
47
+
48
+ def to_str(self) -> str:
49
+ """Returns the string representation of the model using alias"""
50
+ return pprint.pformat(self.model_dump(by_alias=True))
51
+
52
+ def to_json(self) -> str:
53
+ """Returns the JSON representation of the model using alias"""
54
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
+ return json.dumps(self.to_dict())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Optional[Self]:
59
+ """Create an instance of DbKnowledgeProduct from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self) -> Dict[str, Any]:
63
+ """Return the dictionary representation of the model using alias.
64
+
65
+ This has the following differences from calling pydantic's
66
+ `self.model_dump(by_alias=True)`:
67
+
68
+ * `None` is only added to the output dict for nullable fields that
69
+ were set at model initialization. Other fields with value `None`
70
+ are ignored.
71
+ """
72
+ excluded_fields: Set[str] = set([
73
+ ])
74
+
75
+ _dict = self.model_dump(
76
+ by_alias=True,
77
+ exclude=excluded_fields,
78
+ exclude_none=True,
79
+ )
80
+ # override the default output from pydantic by calling `to_dict()` of product_id
81
+ if self.product_id:
82
+ _dict['product_id'] = self.product_id.to_dict()
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of DbKnowledgeProduct 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
+ "client_id": obj.get("client_id"),
96
+ "entity_id": obj.get("entity_id"),
97
+ "handle": obj.get("handle"),
98
+ "overview": obj.get("overview"),
99
+ "product_hash": obj.get("product_hash"),
100
+ "product_id": PgtypeInt8.from_dict(obj["product_id"]) if obj.get("product_id") is not None else None,
101
+ "summary": obj.get("summary"),
102
+ "title": obj.get("title"),
103
+ "type": obj.get("type")
104
+ })
105
+ return _obj
106
+
107
+
@@ -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 DbKnowledgeStore(BaseModel):
26
+ """
27
+ DbKnowledgeStore
28
+ """ # noqa: E501
29
+ client_id: Optional[StrictStr] = None
30
+ description: Optional[StrictStr] = None
31
+ domain: Optional[StrictStr] = None
32
+ entity_id: Optional[StrictStr] = None
33
+ name: Optional[StrictStr] = None
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"]
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 DbKnowledgeStore 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 DbKnowledgeStore 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
+ "description": obj.get("description"),
91
+ "domain": obj.get("domain"),
92
+ "entity_id": obj.get("entity_id"),
93
+ "name": obj.get("name"),
94
+ "overview": obj.get("overview"),
95
+ "title": obj.get("title")
96
+ })
97
+ return _obj
98
+
99
+
@@ -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
+