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
@@ -19,7 +19,9 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
+ from neurograph.v1.models.client_client_info import ClientClientInfo
22
23
  from neurograph.v1.models.client_metadata import ClientMetadata
24
+ from neurograph.v1.models.client_organization_detail import ClientOrganizationDetail
23
25
  from typing import Optional, Set
24
26
  from typing_extensions import Self
25
27
 
@@ -27,9 +29,11 @@ class ClientClientMetadataResponse(BaseModel):
27
29
  """
28
30
  ClientClientMetadataResponse
29
31
  """ # noqa: E501
32
+ client: Optional[ClientClientInfo] = None
30
33
  error: Optional[StrictStr] = None
31
34
  metadata: Optional[List[ClientMetadata]] = None
32
- __properties: ClassVar[List[str]] = ["error", "metadata"]
35
+ organization: Optional[ClientOrganizationDetail] = None
36
+ __properties: ClassVar[List[str]] = ["client", "error", "metadata", "organization"]
33
37
 
34
38
  model_config = ConfigDict(
35
39
  populate_by_name=True,
@@ -70,6 +74,9 @@ class ClientClientMetadataResponse(BaseModel):
70
74
  exclude=excluded_fields,
71
75
  exclude_none=True,
72
76
  )
77
+ # override the default output from pydantic by calling `to_dict()` of client
78
+ if self.client:
79
+ _dict['client'] = self.client.to_dict()
73
80
  # override the default output from pydantic by calling `to_dict()` of each item in metadata (list)
74
81
  _items = []
75
82
  if self.metadata:
@@ -77,6 +84,9 @@ class ClientClientMetadataResponse(BaseModel):
77
84
  if _item_metadata:
78
85
  _items.append(_item_metadata.to_dict())
79
86
  _dict['metadata'] = _items
87
+ # override the default output from pydantic by calling `to_dict()` of organization
88
+ if self.organization:
89
+ _dict['organization'] = self.organization.to_dict()
80
90
  return _dict
81
91
 
82
92
  @classmethod
@@ -89,8 +99,10 @@ class ClientClientMetadataResponse(BaseModel):
89
99
  return cls.model_validate(obj)
90
100
 
91
101
  _obj = cls.model_validate({
102
+ "client": ClientClientInfo.from_dict(obj["client"]) if obj.get("client") is not None else None,
92
103
  "error": obj.get("error"),
93
- "metadata": [ClientMetadata.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None
104
+ "metadata": [ClientMetadata.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
105
+ "organization": ClientOrganizationDetail.from_dict(obj["organization"]) if obj.get("organization") is not None else None
94
106
  })
95
107
  return _obj
96
108
 
@@ -19,24 +19,22 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from neurograph.v1.models.db_client_url import DbClientUrl
22
+ from neurograph.v1.models.client_probe import ClientProbe
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class ClientClientCreatResponse(BaseModel):
26
+ class ClientClientUrlRow(BaseModel):
27
27
  """
28
- ClientClientCreatResponse
28
+ ClientClientUrlRow
29
29
  """ # noqa: E501
30
- error: Optional[StrictStr] = None
30
+ client_id: Optional[StrictStr] = None
31
+ customer_environment: Optional[StrictStr] = None
31
32
  id: Optional[StrictInt] = None
32
33
  is_active: Optional[StrictBool] = None
33
- name: Optional[StrictStr] = None
34
- org_id: Optional[StrictInt] = None
35
- ts_created: Optional[StrictStr] = None
36
- ts_updated: Optional[StrictStr] = None
37
- uid: Optional[StrictStr] = None
38
- urls: Optional[List[DbClientUrl]] = None
39
- __properties: ClassVar[List[str]] = ["error", "id", "is_active", "name", "org_id", "ts_created", "ts_updated", "uid", "urls"]
34
+ probes: Optional[List[ClientProbe]] = None
35
+ ts_created: Optional[StrictInt] = None
36
+ url: Optional[StrictStr] = None
37
+ __properties: ClassVar[List[str]] = ["client_id", "customer_environment", "id", "is_active", "probes", "ts_created", "url"]
40
38
 
41
39
  model_config = ConfigDict(
42
40
  populate_by_name=True,
@@ -56,7 +54,7 @@ class ClientClientCreatResponse(BaseModel):
56
54
 
57
55
  @classmethod
58
56
  def from_json(cls, json_str: str) -> Optional[Self]:
59
- """Create an instance of ClientClientCreatResponse from a JSON string"""
57
+ """Create an instance of ClientClientUrlRow from a JSON string"""
60
58
  return cls.from_dict(json.loads(json_str))
61
59
 
62
60
  def to_dict(self) -> Dict[str, Any]:
@@ -77,18 +75,18 @@ class ClientClientCreatResponse(BaseModel):
77
75
  exclude=excluded_fields,
78
76
  exclude_none=True,
79
77
  )
80
- # override the default output from pydantic by calling `to_dict()` of each item in urls (list)
78
+ # override the default output from pydantic by calling `to_dict()` of each item in probes (list)
81
79
  _items = []
82
- if self.urls:
83
- for _item_urls in self.urls:
84
- if _item_urls:
85
- _items.append(_item_urls.to_dict())
86
- _dict['urls'] = _items
80
+ if self.probes:
81
+ for _item_probes in self.probes:
82
+ if _item_probes:
83
+ _items.append(_item_probes.to_dict())
84
+ _dict['probes'] = _items
87
85
  return _dict
88
86
 
89
87
  @classmethod
90
88
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
91
- """Create an instance of ClientClientCreatResponse from a dict"""
89
+ """Create an instance of ClientClientUrlRow from a dict"""
92
90
  if obj is None:
93
91
  return None
94
92
 
@@ -96,15 +94,13 @@ class ClientClientCreatResponse(BaseModel):
96
94
  return cls.model_validate(obj)
97
95
 
98
96
  _obj = cls.model_validate({
99
- "error": obj.get("error"),
97
+ "client_id": obj.get("client_id"),
98
+ "customer_environment": obj.get("customer_environment"),
100
99
  "id": obj.get("id"),
101
100
  "is_active": obj.get("is_active"),
102
- "name": obj.get("name"),
103
- "org_id": obj.get("org_id"),
101
+ "probes": [ClientProbe.from_dict(_item) for _item in obj["probes"]] if obj.get("probes") is not None else None,
104
102
  "ts_created": obj.get("ts_created"),
105
- "ts_updated": obj.get("ts_updated"),
106
- "uid": obj.get("uid"),
107
- "urls": [DbClientUrl.from_dict(_item) for _item in obj["urls"]] if obj.get("urls") is not None else None
103
+ "url": obj.get("url")
108
104
  })
109
105
  return _obj
110
106
 
@@ -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, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from neurograph.v1.models.client_client_url_snapshot_row import ClientClientURLSnapshotRow
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ClientClientURLSnapshotResponse(BaseModel):
27
+ """
28
+ ClientClientURLSnapshotResponse
29
+ """ # noqa: E501
30
+ data: Optional[ClientClientURLSnapshotRow] = None
31
+ error: Optional[StrictStr] = None
32
+ query_probe_id: Optional[StrictStr] = None
33
+ __properties: ClassVar[List[str]] = ["data", "error", "query_probe_id"]
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 ClientClientURLSnapshotResponse 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 data
75
+ if self.data:
76
+ _dict['data'] = self.data.to_dict()
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of ClientClientURLSnapshotResponse 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
+ "data": ClientClientURLSnapshotRow.from_dict(obj["data"]) if obj.get("data") is not None else None,
90
+ "error": obj.get("error"),
91
+ "query_probe_id": obj.get("query_probe_id")
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, Field, 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 ClientClientURLSnapshotRow(BaseModel):
26
+ """
27
+ ClientClientURLSnapshotRow
28
+ """ # noqa: E501
29
+ client_url_id: Optional[StrictInt] = None
30
+ html_raw: Optional[StrictStr] = Field(default=None, description="full HTML; can be large")
31
+ html_sha256: Optional[StrictStr] = Field(default=None, description="hex-encoded")
32
+ page_title: Optional[StrictStr] = None
33
+ probe_id: Optional[StrictStr] = None
34
+ snapshot_id: Optional[StrictStr] = None
35
+ ts_created: Optional[StrictInt] = Field(default=None, description="unix seconds")
36
+ __properties: ClassVar[List[str]] = ["client_url_id", "html_raw", "html_sha256", "page_title", "probe_id", "snapshot_id", "ts_created"]
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 ClientClientURLSnapshotRow 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 ClientClientURLSnapshotRow 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_url_id": obj.get("client_url_id"),
90
+ "html_raw": obj.get("html_raw"),
91
+ "html_sha256": obj.get("html_sha256"),
92
+ "page_title": obj.get("page_title"),
93
+ "probe_id": obj.get("probe_id"),
94
+ "snapshot_id": obj.get("snapshot_id"),
95
+ "ts_created": obj.get("ts_created")
96
+ })
97
+ return _obj
98
+
99
+
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from neurograph.v1.models.db_client_url import DbClientUrl
22
+ from neurograph.v1.models.client_client_url_row import ClientClientUrlRow
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
@@ -27,7 +27,7 @@ class ClientClientUrlsResponse(BaseModel):
27
27
  """
28
28
  ClientClientUrlsResponse
29
29
  """ # noqa: E501
30
- data: Optional[List[DbClientUrl]] = None
30
+ data: Optional[List[ClientClientUrlRow]] = None
31
31
  error: Optional[StrictStr] = None
32
32
  query_client_id: Optional[StrictStr] = None
33
33
  total_rows: Optional[StrictInt] = None
@@ -91,7 +91,7 @@ class ClientClientUrlsResponse(BaseModel):
91
91
  return cls.model_validate(obj)
92
92
 
93
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,
94
+ "data": [ClientClientUrlRow.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
95
95
  "error": obj.get("error"),
96
96
  "query_client_id": obj.get("query_client_id"),
97
97
  "total_rows": obj.get("total_rows")
@@ -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 typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ClientOrganizationBrand(BaseModel):
26
+ """
27
+ ClientOrganizationBrand
28
+ """ # noqa: E501
29
+ background_img_url: Optional[StrictStr] = None
30
+ color1: Optional[StrictStr] = None
31
+ color2: Optional[StrictStr] = None
32
+ color3: Optional[StrictStr] = None
33
+ color4: Optional[StrictStr] = None
34
+ color5: Optional[StrictStr] = None
35
+ id: Optional[StrictStr] = None
36
+ logo_img_url: Optional[StrictStr] = None
37
+ primary_color: Optional[StrictStr] = None
38
+ secondary_color: Optional[StrictStr] = None
39
+ tertiary_color: Optional[StrictStr] = None
40
+ __properties: ClassVar[List[str]] = ["background_img_url", "color1", "color2", "color3", "color4", "color5", "id", "logo_img_url", "primary_color", "secondary_color", "tertiary_color"]
41
+
42
+ model_config = ConfigDict(
43
+ populate_by_name=True,
44
+ validate_assignment=True,
45
+ protected_namespaces=(),
46
+ )
47
+
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.model_dump(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> Optional[Self]:
60
+ """Create an instance of ClientOrganizationBrand from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self) -> Dict[str, Any]:
64
+ """Return the dictionary representation of the model using alias.
65
+
66
+ This has the following differences from calling pydantic's
67
+ `self.model_dump(by_alias=True)`:
68
+
69
+ * `None` is only added to the output dict for nullable fields that
70
+ were set at model initialization. Other fields with value `None`
71
+ are ignored.
72
+ """
73
+ excluded_fields: Set[str] = set([
74
+ ])
75
+
76
+ _dict = self.model_dump(
77
+ by_alias=True,
78
+ exclude=excluded_fields,
79
+ exclude_none=True,
80
+ )
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of ClientOrganizationBrand 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
+ "background_img_url": obj.get("background_img_url"),
94
+ "color1": obj.get("color1"),
95
+ "color2": obj.get("color2"),
96
+ "color3": obj.get("color3"),
97
+ "color4": obj.get("color4"),
98
+ "color5": obj.get("color5"),
99
+ "id": obj.get("id"),
100
+ "logo_img_url": obj.get("logo_img_url"),
101
+ "primary_color": obj.get("primary_color"),
102
+ "secondary_color": obj.get("secondary_color"),
103
+ "tertiary_color": obj.get("tertiary_color")
104
+ })
105
+ return _obj
106
+
107
+
@@ -0,0 +1,115 @@
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, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from neurograph.v1.models.client_organization_brand import ClientOrganizationBrand
23
+ from neurograph.v1.models.client_workbench_config import ClientWorkbenchConfig
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ClientOrganizationDetail(BaseModel):
28
+ """
29
+ ClientOrganizationDetail
30
+ """ # noqa: E501
31
+ branding: Optional[ClientOrganizationBrand] = 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
+ ts_created: Optional[StrictInt] = None
38
+ ts_updated: Optional[StrictInt] = None
39
+ uid: Optional[StrictStr] = None
40
+ url: Optional[StrictStr] = None
41
+ workbench: Optional[ClientWorkbenchConfig] = None
42
+ __properties: ClassVar[List[str]] = ["branding", "description", "id", "image_url", "is_active", "name", "ts_created", "ts_updated", "uid", "url", "workbench"]
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 ClientOrganizationDetail 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
+ # override the default output from pydantic by calling `to_dict()` of branding
84
+ if self.branding:
85
+ _dict['branding'] = self.branding.to_dict()
86
+ # override the default output from pydantic by calling `to_dict()` of workbench
87
+ if self.workbench:
88
+ _dict['workbench'] = self.workbench.to_dict()
89
+ return _dict
90
+
91
+ @classmethod
92
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
+ """Create an instance of ClientOrganizationDetail from a dict"""
94
+ if obj is None:
95
+ return None
96
+
97
+ if not isinstance(obj, dict):
98
+ return cls.model_validate(obj)
99
+
100
+ _obj = cls.model_validate({
101
+ "branding": ClientOrganizationBrand.from_dict(obj["branding"]) if obj.get("branding") is not None else None,
102
+ "description": obj.get("description"),
103
+ "id": obj.get("id"),
104
+ "image_url": obj.get("image_url"),
105
+ "is_active": obj.get("is_active"),
106
+ "name": obj.get("name"),
107
+ "ts_created": obj.get("ts_created"),
108
+ "ts_updated": obj.get("ts_updated"),
109
+ "uid": obj.get("uid"),
110
+ "url": obj.get("url"),
111
+ "workbench": ClientWorkbenchConfig.from_dict(obj["workbench"]) if obj.get("workbench") is not None else None
112
+ })
113
+ return _obj
114
+
115
+