neurograph-core 1.202509242146__py3-none-any.whl → 1.202509282026__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 (36) hide show
  1. neurograph/v1/__init__.py +72 -6
  2. neurograph/v1/api/__init__.py +4 -0
  3. neurograph/v1/api/admin_api.py +575 -0
  4. neurograph/v1/api/dagster_api.py +2 -1
  5. neurograph/v1/api/knowledge_api.py +3 -6
  6. neurograph/v1/api/lookup_api.py +277 -27
  7. neurograph/v1/api/organization_api.py +1 -537
  8. neurograph/v1/api/persona_api.py +29 -16
  9. neurograph/v1/api/user_api.py +1356 -0
  10. neurograph/v1/models/__init__.py +44 -4
  11. neurograph/v1/models/admin_permission_response.py +95 -0
  12. neurograph/v1/models/admin_set_permission_request.py +91 -0
  13. neurograph/v1/models/admin_upsert_user_request.py +91 -0
  14. neurograph/v1/models/admin_upsert_user_response.py +99 -0
  15. neurograph/v1/models/admin_user.py +97 -0
  16. neurograph/v1/models/admin_user_detail_response.py +121 -0
  17. neurograph/v1/models/admin_users_get_many_response.py +97 -0
  18. neurograph/v1/models/admin_users_org_response.py +97 -0
  19. neurograph/v1/models/db_account_organization_brand.py +109 -0
  20. neurograph/v1/models/db_lookup_environment.py +95 -0
  21. neurograph/v1/models/db_my_client.py +99 -0
  22. neurograph/v1/models/db_my_org.py +121 -0
  23. neurograph/v1/models/db_user_client_role.py +93 -0
  24. neurograph/v1/models/db_user_in_db.py +127 -0
  25. neurograph/v1/models/db_user_org_role.py +93 -0
  26. neurograph/v1/models/db_user_role.py +91 -0
  27. neurograph/v1/models/{lookup_lookup_language_response.py → lookup_language_response.py} +4 -4
  28. neurograph/v1/models/lookup_lookup_environments_response.py +97 -0
  29. neurograph/v1/models/lookup_role.py +89 -0
  30. neurograph/v1/models/lookup_roles_response.py +97 -0
  31. neurograph/v1/models/{lookup_lookup_state_response.py → lookup_states_response.py} +4 -4
  32. neurograph/v1/models/me_my_profile_response.py +115 -0
  33. {neurograph_core-1.202509242146.dist-info → neurograph_core-1.202509282026.dist-info}/METADATA +1 -1
  34. {neurograph_core-1.202509242146.dist-info → neurograph_core-1.202509282026.dist-info}/RECORD +36 -14
  35. {neurograph_core-1.202509242146.dist-info → neurograph_core-1.202509282026.dist-info}/WHEEL +0 -0
  36. {neurograph_core-1.202509242146.dist-info → neurograph_core-1.202509282026.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,121 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Neurograph Core
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from neurograph.v1.models.db_account_organization_brand import DbAccountOrganizationBrand
23
+ from neurograph.v1.models.db_user_org_role import DbUserOrgRole
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class DbMyOrg(BaseModel):
28
+ """
29
+ DbMyOrg
30
+ """ # noqa: E501
31
+ brand: Optional[DbAccountOrganizationBrand] = None
32
+ description: Optional[StrictStr] = None
33
+ id: Optional[StrictStr] = None
34
+ image_url: Optional[StrictStr] = None
35
+ is_active: Optional[StrictBool] = None
36
+ name: Optional[StrictStr] = None
37
+ roles: Optional[List[DbUserOrgRole]] = None
38
+ url: Optional[StrictStr] = None
39
+ workbench_is_active: Optional[StrictBool] = None
40
+ workbench_url: Optional[StrictStr] = None
41
+ workbench_url_ext: Optional[StrictStr] = None
42
+ workbench_version_id: Optional[StrictStr] = None
43
+ __properties: ClassVar[List[str]] = ["brand", "description", "id", "image_url", "is_active", "name", "roles", "url", "workbench_is_active", "workbench_url", "workbench_url_ext", "workbench_version_id"]
44
+
45
+ model_config = ConfigDict(
46
+ populate_by_name=True,
47
+ validate_assignment=True,
48
+ protected_namespaces=(),
49
+ )
50
+
51
+
52
+ def to_str(self) -> str:
53
+ """Returns the string representation of the model using alias"""
54
+ return pprint.pformat(self.model_dump(by_alias=True))
55
+
56
+ def to_json(self) -> str:
57
+ """Returns the JSON representation of the model using alias"""
58
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
+ return json.dumps(self.to_dict())
60
+
61
+ @classmethod
62
+ def from_json(cls, json_str: str) -> Optional[Self]:
63
+ """Create an instance of DbMyOrg from a JSON string"""
64
+ return cls.from_dict(json.loads(json_str))
65
+
66
+ def to_dict(self) -> Dict[str, Any]:
67
+ """Return the dictionary representation of the model using alias.
68
+
69
+ This has the following differences from calling pydantic's
70
+ `self.model_dump(by_alias=True)`:
71
+
72
+ * `None` is only added to the output dict for nullable fields that
73
+ were set at model initialization. Other fields with value `None`
74
+ are ignored.
75
+ """
76
+ excluded_fields: Set[str] = set([
77
+ ])
78
+
79
+ _dict = self.model_dump(
80
+ by_alias=True,
81
+ exclude=excluded_fields,
82
+ exclude_none=True,
83
+ )
84
+ # override the default output from pydantic by calling `to_dict()` of brand
85
+ if self.brand:
86
+ _dict['brand'] = self.brand.to_dict()
87
+ # override the default output from pydantic by calling `to_dict()` of each item in roles (list)
88
+ _items = []
89
+ if self.roles:
90
+ for _item_roles in self.roles:
91
+ if _item_roles:
92
+ _items.append(_item_roles.to_dict())
93
+ _dict['roles'] = _items
94
+ return _dict
95
+
96
+ @classmethod
97
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
98
+ """Create an instance of DbMyOrg from a dict"""
99
+ if obj is None:
100
+ return None
101
+
102
+ if not isinstance(obj, dict):
103
+ return cls.model_validate(obj)
104
+
105
+ _obj = cls.model_validate({
106
+ "brand": DbAccountOrganizationBrand.from_dict(obj["brand"]) if obj.get("brand") is not None else None,
107
+ "description": obj.get("description"),
108
+ "id": obj.get("id"),
109
+ "image_url": obj.get("image_url"),
110
+ "is_active": obj.get("is_active"),
111
+ "name": obj.get("name"),
112
+ "roles": [DbUserOrgRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
113
+ "url": obj.get("url"),
114
+ "workbench_is_active": obj.get("workbench_is_active"),
115
+ "workbench_url": obj.get("workbench_url"),
116
+ "workbench_url_ext": obj.get("workbench_url_ext"),
117
+ "workbench_version_id": obj.get("workbench_version_id")
118
+ })
119
+ return _obj
120
+
121
+
@@ -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, 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 DbUserClientRole(BaseModel):
26
+ """
27
+ DbUserClientRole
28
+ """ # noqa: E501
29
+ client_id: Optional[StrictStr] = None
30
+ id: Optional[StrictInt] = None
31
+ role_name: Optional[StrictStr] = None
32
+ ts_created: Optional[StrictInt] = None
33
+ __properties: ClassVar[List[str]] = ["client_id", "id", "role_name", "ts_created"]
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 DbUserClientRole 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
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of DbUserClientRole from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "client_id": obj.get("client_id"),
87
+ "id": obj.get("id"),
88
+ "role_name": obj.get("role_name"),
89
+ "ts_created": obj.get("ts_created")
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,127 @@
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.db_user_client_role import DbUserClientRole
23
+ from neurograph.v1.models.db_user_org_role import DbUserOrgRole
24
+ from neurograph.v1.models.db_user_role import DbUserRole
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class DbUserInDb(BaseModel):
29
+ """
30
+ DbUserInDb
31
+ """ # noqa: E501
32
+ client_roles: Optional[List[DbUserClientRole]] = None
33
+ display_name: Optional[StrictStr] = None
34
+ email: Optional[StrictStr] = None
35
+ firebase_uid: Optional[StrictStr] = None
36
+ id: Optional[StrictInt] = None
37
+ org_roles: Optional[List[DbUserOrgRole]] = None
38
+ roles: Optional[List[DbUserRole]] = None
39
+ ts_created: Optional[StrictInt] = None
40
+ ts_updated: Optional[StrictInt] = None
41
+ __properties: ClassVar[List[str]] = ["client_roles", "display_name", "email", "firebase_uid", "id", "org_roles", "roles", "ts_created", "ts_updated"]
42
+
43
+ model_config = ConfigDict(
44
+ populate_by_name=True,
45
+ validate_assignment=True,
46
+ protected_namespaces=(),
47
+ )
48
+
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.model_dump(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
57
+ return json.dumps(self.to_dict())
58
+
59
+ @classmethod
60
+ def from_json(cls, json_str: str) -> Optional[Self]:
61
+ """Create an instance of DbUserInDb from a JSON string"""
62
+ return cls.from_dict(json.loads(json_str))
63
+
64
+ def to_dict(self) -> Dict[str, Any]:
65
+ """Return the dictionary representation of the model using alias.
66
+
67
+ This has the following differences from calling pydantic's
68
+ `self.model_dump(by_alias=True)`:
69
+
70
+ * `None` is only added to the output dict for nullable fields that
71
+ were set at model initialization. Other fields with value `None`
72
+ are ignored.
73
+ """
74
+ excluded_fields: Set[str] = set([
75
+ ])
76
+
77
+ _dict = self.model_dump(
78
+ by_alias=True,
79
+ exclude=excluded_fields,
80
+ exclude_none=True,
81
+ )
82
+ # override the default output from pydantic by calling `to_dict()` of each item in client_roles (list)
83
+ _items = []
84
+ if self.client_roles:
85
+ for _item_client_roles in self.client_roles:
86
+ if _item_client_roles:
87
+ _items.append(_item_client_roles.to_dict())
88
+ _dict['client_roles'] = _items
89
+ # override the default output from pydantic by calling `to_dict()` of each item in org_roles (list)
90
+ _items = []
91
+ if self.org_roles:
92
+ for _item_org_roles in self.org_roles:
93
+ if _item_org_roles:
94
+ _items.append(_item_org_roles.to_dict())
95
+ _dict['org_roles'] = _items
96
+ # override the default output from pydantic by calling `to_dict()` of each item in roles (list)
97
+ _items = []
98
+ if self.roles:
99
+ for _item_roles in self.roles:
100
+ if _item_roles:
101
+ _items.append(_item_roles.to_dict())
102
+ _dict['roles'] = _items
103
+ return _dict
104
+
105
+ @classmethod
106
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
107
+ """Create an instance of DbUserInDb from a dict"""
108
+ if obj is None:
109
+ return None
110
+
111
+ if not isinstance(obj, dict):
112
+ return cls.model_validate(obj)
113
+
114
+ _obj = cls.model_validate({
115
+ "client_roles": [DbUserClientRole.from_dict(_item) for _item in obj["client_roles"]] if obj.get("client_roles") is not None else None,
116
+ "display_name": obj.get("display_name"),
117
+ "email": obj.get("email"),
118
+ "firebase_uid": obj.get("firebase_uid"),
119
+ "id": obj.get("id"),
120
+ "org_roles": [DbUserOrgRole.from_dict(_item) for _item in obj["org_roles"]] if obj.get("org_roles") is not None else None,
121
+ "roles": [DbUserRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
122
+ "ts_created": obj.get("ts_created"),
123
+ "ts_updated": obj.get("ts_updated")
124
+ })
125
+ return _obj
126
+
127
+
@@ -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, 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 DbUserOrgRole(BaseModel):
26
+ """
27
+ DbUserOrgRole
28
+ """ # noqa: E501
29
+ id: Optional[StrictInt] = None
30
+ org_id: Optional[StrictStr] = None
31
+ role_name: Optional[StrictStr] = None
32
+ ts_created: Optional[StrictInt] = None
33
+ __properties: ClassVar[List[str]] = ["id", "org_id", "role_name", "ts_created"]
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 DbUserOrgRole 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
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of DbUserOrgRole from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "id": obj.get("id"),
87
+ "org_id": obj.get("org_id"),
88
+ "role_name": obj.get("role_name"),
89
+ "ts_created": obj.get("ts_created")
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,91 @@
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 DbUserRole(BaseModel):
26
+ """
27
+ DbUserRole
28
+ """ # noqa: E501
29
+ id: Optional[StrictInt] = None
30
+ role_name: Optional[StrictStr] = None
31
+ ts_created: Optional[StrictInt] = None
32
+ __properties: ClassVar[List[str]] = ["id", "role_name", "ts_created"]
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 DbUserRole 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
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of DbUserRole from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "id": obj.get("id"),
86
+ "role_name": obj.get("role_name"),
87
+ "ts_created": obj.get("ts_created")
88
+ })
89
+ return _obj
90
+
91
+
@@ -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.db_lookup_environment import DbLookupEnvironment
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[DbLookupEnvironment]] = 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": [DbLookupEnvironment.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
+