neurograph-core 1.202508112256__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 (105) hide show
  1. neurograph/__init__.py +0 -0
  2. neurograph/v1/__init__.py +227 -0
  3. neurograph/v1/api/__init__.py +15 -0
  4. neurograph/v1/api/atlas_api.py +588 -0
  5. neurograph/v1/api/authentication_api.py +830 -0
  6. neurograph/v1/api/client_api.py +1684 -0
  7. neurograph/v1/api/client_metadata_api.py +871 -0
  8. neurograph/v1/api/lookup_api.py +1049 -0
  9. neurograph/v1/api/organization_api.py +1975 -0
  10. neurograph/v1/api/organization_metadata_api.py +872 -0
  11. neurograph/v1/api/persona_api.py +1920 -0
  12. neurograph/v1/api/system_api.py +293 -0
  13. neurograph/v1/api/tasks_api.py +285 -0
  14. neurograph/v1/api/workbench_api.py +857 -0
  15. neurograph/v1/api_client.py +801 -0
  16. neurograph/v1/api_response.py +21 -0
  17. neurograph/v1/configuration.py +612 -0
  18. neurograph/v1/exceptions.py +216 -0
  19. neurograph/v1/models/__init__.py +96 -0
  20. neurograph/v1/models/atlas_atlas_version.py +99 -0
  21. neurograph/v1/models/atlas_atlas_version_many_response.py +97 -0
  22. neurograph/v1/models/atlas_atlas_version_response.py +101 -0
  23. neurograph/v1/models/atlas_atlas_version_upsert_request.py +95 -0
  24. neurograph/v1/models/auth_service_token_request.py +87 -0
  25. neurograph/v1/models/auth_test_service_token_response.py +89 -0
  26. neurograph/v1/models/auth_test_token_response.py +87 -0
  27. neurograph/v1/models/client_client.py +109 -0
  28. neurograph/v1/models/client_client_creat_response.py +111 -0
  29. neurograph/v1/models/client_client_create_request.py +95 -0
  30. neurograph/v1/models/client_client_get_detail_response.py +93 -0
  31. neurograph/v1/models/client_client_get_many_response.py +105 -0
  32. neurograph/v1/models/client_client_metadata_request.py +89 -0
  33. neurograph/v1/models/client_client_metadata_response.py +97 -0
  34. neurograph/v1/models/client_client_personas_response.py +99 -0
  35. neurograph/v1/models/client_client_url_upsert_request.py +99 -0
  36. neurograph/v1/models/client_client_url_upsert_response.py +101 -0
  37. neurograph/v1/models/client_client_urls_response.py +101 -0
  38. neurograph/v1/models/client_delete_metadata_request.py +87 -0
  39. neurograph/v1/models/client_kpi.py +93 -0
  40. neurograph/v1/models/client_metadata.py +93 -0
  41. neurograph/v1/models/client_persona.py +171 -0
  42. neurograph/v1/models/client_persona_factor.py +99 -0
  43. neurograph/v1/models/client_persona_insight.py +93 -0
  44. neurograph/v1/models/client_persona_personality_trait.py +93 -0
  45. neurograph/v1/models/client_query.py +93 -0
  46. neurograph/v1/models/db_client_url.py +99 -0
  47. neurograph/v1/models/db_persona_factor_create_params.py +97 -0
  48. neurograph/v1/models/lookup_language.py +97 -0
  49. neurograph/v1/models/lookup_lookup_language_response.py +97 -0
  50. neurograph/v1/models/lookup_lookup_state_response.py +97 -0
  51. neurograph/v1/models/lookup_state.py +91 -0
  52. neurograph/v1/models/lookup_state_response.py +93 -0
  53. neurograph/v1/models/organizations_atlas_config.py +97 -0
  54. neurograph/v1/models/organizations_brand_detail_response.py +109 -0
  55. neurograph/v1/models/organizations_brand_upsert_request.py +107 -0
  56. neurograph/v1/models/organizations_delete_metadata_request.py +87 -0
  57. neurograph/v1/models/organizations_delete_metadata_response.py +97 -0
  58. neurograph/v1/models/organizations_metadata.py +93 -0
  59. neurograph/v1/models/organizations_organization.py +103 -0
  60. neurograph/v1/models/organizations_organization_brand.py +107 -0
  61. neurograph/v1/models/organizations_organization_create_request.py +97 -0
  62. neurograph/v1/models/organizations_organization_detail_response.py +123 -0
  63. neurograph/v1/models/organizations_organization_get_many_response.py +103 -0
  64. neurograph/v1/models/organizations_organization_metadata_request.py +89 -0
  65. neurograph/v1/models/organizations_organization_metadata_response.py +97 -0
  66. neurograph/v1/models/organizations_organization_set_atlas_request.py +93 -0
  67. neurograph/v1/models/organizations_organization_set_atlas_response.py +99 -0
  68. neurograph/v1/models/organizations_organization_set_workbench_request.py +93 -0
  69. neurograph/v1/models/organizations_organization_set_workbench_response.py +99 -0
  70. neurograph/v1/models/organizations_organization_update_request.py +99 -0
  71. neurograph/v1/models/organizations_workbench_config.py +97 -0
  72. neurograph/v1/models/personas_match_criteria_row.py +97 -0
  73. neurograph/v1/models/personas_match_criteria_row_in.py +93 -0
  74. neurograph/v1/models/personas_persona_factor.py +101 -0
  75. neurograph/v1/models/personas_persona_factor_create_request.py +95 -0
  76. neurograph/v1/models/personas_persona_factor_create_response.py +97 -0
  77. neurograph/v1/models/personas_persona_insight_create_request.py +91 -0
  78. neurograph/v1/models/personas_persona_insight_create_response.py +95 -0
  79. neurograph/v1/models/personas_persona_instance_create_request.py +123 -0
  80. neurograph/v1/models/personas_persona_instance_create_response.py +127 -0
  81. neurograph/v1/models/personas_persona_kpi_create_request.py +95 -0
  82. neurograph/v1/models/personas_persona_kpi_create_response.py +97 -0
  83. neurograph/v1/models/personas_persona_kpi_req.py +91 -0
  84. neurograph/v1/models/personas_persona_kpi_resp.py +95 -0
  85. neurograph/v1/models/personas_persona_match_criteria_request.py +95 -0
  86. neurograph/v1/models/personas_persona_match_criteria_response.py +97 -0
  87. neurograph/v1/models/personas_persona_seed_create_request.py +89 -0
  88. neurograph/v1/models/personas_persona_seed_create_response.py +97 -0
  89. neurograph/v1/models/personas_persona_trait_create_request.py +95 -0
  90. neurograph/v1/models/personas_persona_trait_create_response.py +97 -0
  91. neurograph/v1/models/personas_personality_trait_in.py +91 -0
  92. neurograph/v1/models/personas_personality_trait_out.py +95 -0
  93. neurograph/v1/models/tasks_sync_from_firebase_result.py +87 -0
  94. neurograph/v1/models/workbench_workbench_url_check_request.py +87 -0
  95. neurograph/v1/models/workbench_workbench_url_check_response.py +111 -0
  96. neurograph/v1/models/workbench_workbench_version.py +99 -0
  97. neurograph/v1/models/workbench_workbench_version_many_response.py +97 -0
  98. neurograph/v1/models/workbench_workbench_version_response.py +101 -0
  99. neurograph/v1/models/workbench_workbench_version_upsert_request.py +95 -0
  100. neurograph/v1/py.typed +0 -0
  101. neurograph/v1/rest.py +258 -0
  102. neurograph_core-1.202508112256.dist-info/METADATA +62 -0
  103. neurograph_core-1.202508112256.dist-info/RECORD +105 -0
  104. neurograph_core-1.202508112256.dist-info/WHEEL +5 -0
  105. neurograph_core-1.202508112256.dist-info/top_level.txt +1 -0
@@ -0,0 +1,101 @@
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_client_url import DbClientUrl
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ClientClientUrlsResponse(BaseModel):
27
+ """
28
+ ClientClientUrlsResponse
29
+ """ # noqa: E501
30
+ data: Optional[List[DbClientUrl]] = None
31
+ error: Optional[StrictStr] = None
32
+ query_client_id: Optional[StrictInt] = None
33
+ total_rows: Optional[StrictInt] = None
34
+ __properties: ClassVar[List[str]] = ["data", "error", "query_client_id", "total_rows"]
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 ClientClientUrlsResponse 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
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of ClientClientUrlsResponse from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "data": [DbClientUrl.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
95
+ "error": obj.get("error"),
96
+ "query_client_id": obj.get("query_client_id"),
97
+ "total_rows": obj.get("total_rows")
98
+ })
99
+ return _obj
100
+
101
+
@@ -0,0 +1,87 @@
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 ClientDeleteMetadataRequest(BaseModel):
26
+ """
27
+ ClientDeleteMetadataRequest
28
+ """ # noqa: E501
29
+ key: Optional[StrictStr] = None
30
+ __properties: ClassVar[List[str]] = ["key"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of ClientDeleteMetadataRequest from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of ClientDeleteMetadataRequest from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "key": obj.get("key")
84
+ })
85
+ return _obj
86
+
87
+
@@ -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 ClientKpi(BaseModel):
26
+ """
27
+ ClientKpi
28
+ """ # noqa: E501
29
+ id: Optional[StrictInt] = None
30
+ name: Optional[StrictStr] = None
31
+ persona_instance_id: Optional[StrictInt] = None
32
+ value: Optional[StrictStr] = None
33
+ __properties: ClassVar[List[str]] = ["id", "name", "persona_instance_id", "value"]
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 ClientKpi 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 ClientKpi 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
+ "name": obj.get("name"),
88
+ "persona_instance_id": obj.get("persona_instance_id"),
89
+ "value": obj.get("value")
90
+ })
91
+ return _obj
92
+
93
+
@@ -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 typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ClientMetadata(BaseModel):
26
+ """
27
+ ClientMetadata
28
+ """ # noqa: E501
29
+ key: Optional[StrictStr] = None
30
+ ts_created: Optional[StrictStr] = None
31
+ ts_updated: Optional[StrictStr] = None
32
+ value: Optional[StrictStr] = None
33
+ __properties: ClassVar[List[str]] = ["key", "ts_created", "ts_updated", "value"]
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 ClientMetadata 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 ClientMetadata 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
+ "key": obj.get("key"),
87
+ "ts_created": obj.get("ts_created"),
88
+ "ts_updated": obj.get("ts_updated"),
89
+ "value": obj.get("value")
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,171 @@
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.client_kpi import ClientKpi
23
+ from neurograph.v1.models.client_persona_factor import ClientPersonaFactor
24
+ from neurograph.v1.models.client_persona_insight import ClientPersonaInsight
25
+ from neurograph.v1.models.client_persona_personality_trait import ClientPersonaPersonalityTrait
26
+ from typing import Optional, Set
27
+ from typing_extensions import Self
28
+
29
+ class ClientPersona(BaseModel):
30
+ """
31
+ ClientPersona
32
+ """ # noqa: E501
33
+ age: Optional[Union[StrictFloat, StrictInt]] = None
34
+ description: Optional[StrictStr] = None
35
+ factors: Optional[List[ClientPersonaFactor]] = None
36
+ female: Optional[Union[StrictFloat, StrictInt]] = None
37
+ id: Optional[StrictInt] = None
38
+ income: Optional[StrictStr] = None
39
+ insights: Optional[List[ClientPersonaInsight]] = None
40
+ kpis: Optional[List[ClientKpi]] = None
41
+ male: Optional[Union[StrictFloat, StrictInt]] = None
42
+ metadata: Optional[StrictStr] = None
43
+ name: Optional[StrictStr] = None
44
+ persona_seed_id: Optional[StrictInt] = None
45
+ personality_background: Optional[StrictStr] = None
46
+ personality_first_name: Optional[StrictStr] = None
47
+ personality_img_url: Optional[StrictStr] = None
48
+ personality_last_name: Optional[StrictStr] = None
49
+ personality_quote: Optional[StrictStr] = None
50
+ personality_traits: Optional[List[ClientPersonaPersonalityTrait]] = None
51
+ personality_video_url: Optional[StrictStr] = None
52
+ positioning_statement: Optional[StrictStr] = None
53
+ seed_uid: Optional[StrictStr] = None
54
+ summary_detail: Optional[StrictStr] = None
55
+ summary_headline: Optional[StrictStr] = None
56
+ tag: Optional[StrictStr] = None
57
+ ts_created: Optional[StrictStr] = None
58
+ ts_updated: Optional[StrictStr] = None
59
+ value: Optional[StrictStr] = None
60
+ __properties: ClassVar[List[str]] = ["age", "description", "factors", "female", "id", "income", "insights", "kpis", "male", "metadata", "name", "persona_seed_id", "personality_background", "personality_first_name", "personality_img_url", "personality_last_name", "personality_quote", "personality_traits", "personality_video_url", "positioning_statement", "seed_uid", "summary_detail", "summary_headline", "tag", "ts_created", "ts_updated", "value"]
61
+
62
+ model_config = ConfigDict(
63
+ populate_by_name=True,
64
+ validate_assignment=True,
65
+ protected_namespaces=(),
66
+ )
67
+
68
+
69
+ def to_str(self) -> str:
70
+ """Returns the string representation of the model using alias"""
71
+ return pprint.pformat(self.model_dump(by_alias=True))
72
+
73
+ def to_json(self) -> str:
74
+ """Returns the JSON representation of the model using alias"""
75
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
76
+ return json.dumps(self.to_dict())
77
+
78
+ @classmethod
79
+ def from_json(cls, json_str: str) -> Optional[Self]:
80
+ """Create an instance of ClientPersona from a JSON string"""
81
+ return cls.from_dict(json.loads(json_str))
82
+
83
+ def to_dict(self) -> Dict[str, Any]:
84
+ """Return the dictionary representation of the model using alias.
85
+
86
+ This has the following differences from calling pydantic's
87
+ `self.model_dump(by_alias=True)`:
88
+
89
+ * `None` is only added to the output dict for nullable fields that
90
+ were set at model initialization. Other fields with value `None`
91
+ are ignored.
92
+ """
93
+ excluded_fields: Set[str] = set([
94
+ ])
95
+
96
+ _dict = self.model_dump(
97
+ by_alias=True,
98
+ exclude=excluded_fields,
99
+ exclude_none=True,
100
+ )
101
+ # override the default output from pydantic by calling `to_dict()` of each item in factors (list)
102
+ _items = []
103
+ if self.factors:
104
+ for _item_factors in self.factors:
105
+ if _item_factors:
106
+ _items.append(_item_factors.to_dict())
107
+ _dict['factors'] = _items
108
+ # override the default output from pydantic by calling `to_dict()` of each item in insights (list)
109
+ _items = []
110
+ if self.insights:
111
+ for _item_insights in self.insights:
112
+ if _item_insights:
113
+ _items.append(_item_insights.to_dict())
114
+ _dict['insights'] = _items
115
+ # override the default output from pydantic by calling `to_dict()` of each item in kpis (list)
116
+ _items = []
117
+ if self.kpis:
118
+ for _item_kpis in self.kpis:
119
+ if _item_kpis:
120
+ _items.append(_item_kpis.to_dict())
121
+ _dict['kpis'] = _items
122
+ # override the default output from pydantic by calling `to_dict()` of each item in personality_traits (list)
123
+ _items = []
124
+ if self.personality_traits:
125
+ for _item_personality_traits in self.personality_traits:
126
+ if _item_personality_traits:
127
+ _items.append(_item_personality_traits.to_dict())
128
+ _dict['personality_traits'] = _items
129
+ return _dict
130
+
131
+ @classmethod
132
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
133
+ """Create an instance of ClientPersona from a dict"""
134
+ if obj is None:
135
+ return None
136
+
137
+ if not isinstance(obj, dict):
138
+ return cls.model_validate(obj)
139
+
140
+ _obj = cls.model_validate({
141
+ "age": obj.get("age"),
142
+ "description": obj.get("description"),
143
+ "factors": [ClientPersonaFactor.from_dict(_item) for _item in obj["factors"]] if obj.get("factors") is not None else None,
144
+ "female": obj.get("female"),
145
+ "id": obj.get("id"),
146
+ "income": obj.get("income"),
147
+ "insights": [ClientPersonaInsight.from_dict(_item) for _item in obj["insights"]] if obj.get("insights") is not None else None,
148
+ "kpis": [ClientKpi.from_dict(_item) for _item in obj["kpis"]] if obj.get("kpis") is not None else None,
149
+ "male": obj.get("male"),
150
+ "metadata": obj.get("metadata"),
151
+ "name": obj.get("name"),
152
+ "persona_seed_id": obj.get("persona_seed_id"),
153
+ "personality_background": obj.get("personality_background"),
154
+ "personality_first_name": obj.get("personality_first_name"),
155
+ "personality_img_url": obj.get("personality_img_url"),
156
+ "personality_last_name": obj.get("personality_last_name"),
157
+ "personality_quote": obj.get("personality_quote"),
158
+ "personality_traits": [ClientPersonaPersonalityTrait.from_dict(_item) for _item in obj["personality_traits"]] if obj.get("personality_traits") is not None else None,
159
+ "personality_video_url": obj.get("personality_video_url"),
160
+ "positioning_statement": obj.get("positioning_statement"),
161
+ "seed_uid": obj.get("seed_uid"),
162
+ "summary_detail": obj.get("summary_detail"),
163
+ "summary_headline": obj.get("summary_headline"),
164
+ "tag": obj.get("tag"),
165
+ "ts_created": obj.get("ts_created"),
166
+ "ts_updated": obj.get("ts_updated"),
167
+ "value": obj.get("value")
168
+ })
169
+ return _obj
170
+
171
+
@@ -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 ClientPersonaFactor(BaseModel):
26
+ """
27
+ ClientPersonaFactor
28
+ """ # noqa: E501
29
+ detail: Optional[StrictStr] = None
30
+ display: Optional[StrictStr] = None
31
+ id: Optional[StrictInt] = None
32
+ name: Optional[StrictStr] = None
33
+ persona_instance_id: Optional[StrictInt] = None
34
+ summary: Optional[StrictStr] = None
35
+ value: Optional[StrictInt] = None
36
+ __properties: ClassVar[List[str]] = ["detail", "display", "id", "name", "persona_instance_id", "summary", "value"]
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 ClientPersonaFactor 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 ClientPersonaFactor 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
+ "detail": obj.get("detail"),
90
+ "display": obj.get("display"),
91
+ "id": obj.get("id"),
92
+ "name": obj.get("name"),
93
+ "persona_instance_id": obj.get("persona_instance_id"),
94
+ "summary": obj.get("summary"),
95
+ "value": obj.get("value")
96
+ })
97
+ return _obj
98
+
99
+