neurograph-core 1.202509252137__py3-none-any.whl → 1.202510040107__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 (48) hide show
  1. neurograph/v1/__init__.py +63 -198
  2. neurograph/v1/api/__init__.py +4 -27
  3. neurograph/v1/api/admin_api.py +1123 -0
  4. neurograph/v1/api/client_api.py +263 -0
  5. neurograph/v1/api/dagster_api.py +2 -1
  6. neurograph/v1/api/knowledge_api.py +296 -0
  7. neurograph/v1/api/knowledge_extract_api.py +1 -1
  8. neurograph/v1/api/lookup_api.py +279 -27
  9. neurograph/v1/api/organization_api.py +128 -137
  10. neurograph/v1/api/persona_api.py +2 -1
  11. neurograph/v1/api/reporting_api.py +300 -0
  12. neurograph/v1/api/user_api.py +282 -0
  13. neurograph/v1/api_client.py +4 -4
  14. neurograph/v1/models/__init__.py +29 -170
  15. neurograph/v1/models/admin_permission_response.py +95 -0
  16. neurograph/v1/models/admin_set_permission_request.py +91 -0
  17. neurograph/v1/models/admin_upsert_user_request.py +91 -0
  18. neurograph/v1/models/admin_upsert_user_response.py +99 -0
  19. neurograph/v1/models/admin_user.py +97 -0
  20. neurograph/v1/models/admin_user_detail_response.py +121 -0
  21. neurograph/v1/models/admin_users_get_many_response.py +97 -0
  22. neurograph/v1/models/admin_users_org_response.py +97 -0
  23. neurograph/v1/models/db_account_organization_brand.py +109 -0
  24. neurograph/v1/models/db_my_client.py +99 -0
  25. neurograph/v1/models/db_my_org.py +121 -0
  26. neurograph/v1/models/db_user_client_role.py +93 -0
  27. neurograph/v1/models/db_user_in_db.py +127 -0
  28. neurograph/v1/models/db_user_org_role.py +93 -0
  29. neurograph/v1/models/db_user_role.py +91 -0
  30. neurograph/v1/models/knowledge_enrichment_artifact_create_request.py +3 -1
  31. neurograph/v1/models/knowledge_enrichment_query.py +3 -1
  32. neurograph/v1/models/knowledge_product.py +103 -0
  33. neurograph/v1/models/knowledge_product_upsert_request.py +95 -0
  34. neurograph/v1/models/knowledge_product_upsert_response.py +99 -0
  35. neurograph/v1/models/lookup_env.py +89 -0
  36. neurograph/v1/models/{lookup_lookup_language_response.py → lookup_language_response.py} +4 -4
  37. neurograph/v1/models/lookup_lookup_environments_response.py +97 -0
  38. neurograph/v1/models/lookup_role.py +89 -0
  39. neurograph/v1/models/lookup_roles_response.py +97 -0
  40. neurograph/v1/models/{lookup_lookup_state_response.py → lookup_states_response.py} +4 -4
  41. neurograph/v1/models/me_my_profile_response.py +115 -0
  42. neurograph/v1/models/reporting_daily_metric.py +95 -0
  43. neurograph/v1/models/reporting_daily_metrics_response.py +97 -0
  44. neurograph/v1/models/reporting_query.py +91 -0
  45. {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/METADATA +2 -3
  46. {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/RECORD +48 -19
  47. {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/WHEEL +0 -0
  48. {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/top_level.txt +0 -0
@@ -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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from neurograph.v1.models.knowledge_product import KnowledgeProduct
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class KnowledgeProductUpsertRequest(BaseModel):
27
+ """
28
+ KnowledgeProductUpsertRequest
29
+ """ # noqa: E501
30
+ data: Optional[List[KnowledgeProduct]] = None
31
+ __properties: ClassVar[List[str]] = ["data"]
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 KnowledgeProductUpsertRequest 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
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
73
+ _items = []
74
+ if self.data:
75
+ for _item_data in self.data:
76
+ if _item_data:
77
+ _items.append(_item_data.to_dict())
78
+ _dict['data'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of KnowledgeProductUpsertRequest 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
+ "data": [KnowledgeProduct.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
92
+ })
93
+ return _obj
94
+
95
+
@@ -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 neurograph.v1.models.knowledge_entity_err_row import KnowledgeEntityErrRow
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class KnowledgeProductUpsertResponse(BaseModel):
27
+ """
28
+ KnowledgeProductUpsertResponse
29
+ """ # noqa: E501
30
+ error: Optional[StrictStr] = None
31
+ error_rows: Optional[List[KnowledgeEntityErrRow]] = None
32
+ rows_upserted: Optional[StrictInt] = None
33
+ __properties: ClassVar[List[str]] = ["error", "error_rows", "rows_upserted"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of KnowledgeProductUpsertResponse from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of each item in error_rows (list)
75
+ _items = []
76
+ if self.error_rows:
77
+ for _item_error_rows in self.error_rows:
78
+ if _item_error_rows:
79
+ _items.append(_item_error_rows.to_dict())
80
+ _dict['error_rows'] = _items
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of KnowledgeProductUpsertResponse from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({
93
+ "error": obj.get("error"),
94
+ "error_rows": [KnowledgeEntityErrRow.from_dict(_item) for _item in obj["error_rows"]] if obj.get("error_rows") is not None else None,
95
+ "rows_upserted": obj.get("rows_upserted")
96
+ })
97
+ return _obj
98
+
99
+
@@ -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 LookupEnv(BaseModel):
26
+ """
27
+ LookupEnv
28
+ """ # noqa: E501
29
+ id: Optional[StrictInt] = None
30
+ name: Optional[StrictStr] = None
31
+ __properties: ClassVar[List[str]] = ["id", "name"]
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 LookupEnv 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 LookupEnv 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
+ "id": obj.get("id"),
85
+ "name": obj.get("name")
86
+ })
87
+ return _obj
88
+
89
+
@@ -23,9 +23,9 @@ from neurograph.v1.models.lookup_language import LookupLanguage
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class LookupLookupLanguageResponse(BaseModel):
26
+ class LookupLanguageResponse(BaseModel):
27
27
  """
28
- LookupLookupLanguageResponse
28
+ LookupLanguageResponse
29
29
  """ # noqa: E501
30
30
  data: Optional[List[LookupLanguage]] = None
31
31
  error: Optional[StrictStr] = None
@@ -49,7 +49,7 @@ class LookupLookupLanguageResponse(BaseModel):
49
49
 
50
50
  @classmethod
51
51
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of LookupLookupLanguageResponse from a JSON string"""
52
+ """Create an instance of LookupLanguageResponse 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]:
@@ -81,7 +81,7 @@ class LookupLookupLanguageResponse(BaseModel):
81
81
 
82
82
  @classmethod
83
83
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
- """Create an instance of LookupLookupLanguageResponse from a dict"""
84
+ """Create an instance of LookupLanguageResponse from a dict"""
85
85
  if obj is None:
86
86
  return None
87
87
 
@@ -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.lookup_env import LookupEnv
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class LookupLookupEnvironmentsResponse(BaseModel):
27
+ """
28
+ LookupLookupEnvironmentsResponse
29
+ """ # noqa: E501
30
+ data: Optional[List[LookupEnv]] = 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 LookupLookupEnvironmentsResponse 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 LookupLookupEnvironmentsResponse 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": [LookupEnv.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
+
@@ -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, 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 LookupRole(BaseModel):
26
+ """
27
+ LookupRole
28
+ """ # noqa: E501
29
+ description: Optional[StrictStr] = None
30
+ name: Optional[StrictStr] = None
31
+ __properties: ClassVar[List[str]] = ["description", "name"]
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 LookupRole 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 LookupRole 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
+ "description": obj.get("description"),
85
+ "name": obj.get("name")
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 neurograph.v1.models.lookup_role import LookupRole
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class LookupRolesResponse(BaseModel):
27
+ """
28
+ LookupRolesResponse
29
+ """ # noqa: E501
30
+ data: Optional[List[LookupRole]] = 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 LookupRolesResponse 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 LookupRolesResponse 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": [LookupRole.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
+
@@ -23,9 +23,9 @@ from neurograph.v1.models.lookup_state import LookupState
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class LookupLookupStateResponse(BaseModel):
26
+ class LookupStatesResponse(BaseModel):
27
27
  """
28
- LookupLookupStateResponse
28
+ LookupStatesResponse
29
29
  """ # noqa: E501
30
30
  data: Optional[List[LookupState]] = None
31
31
  error: Optional[StrictStr] = None
@@ -49,7 +49,7 @@ class LookupLookupStateResponse(BaseModel):
49
49
 
50
50
  @classmethod
51
51
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of LookupLookupStateResponse from a JSON string"""
52
+ """Create an instance of LookupStatesResponse 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]:
@@ -81,7 +81,7 @@ class LookupLookupStateResponse(BaseModel):
81
81
 
82
82
  @classmethod
83
83
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
- """Create an instance of LookupLookupStateResponse from a dict"""
84
+ """Create an instance of LookupStatesResponse from a dict"""
85
85
  if obj is None:
86
86
  return None
87
87