graphscope-flex 0.27.0__py2.py3-none-any.whl → 0.29.0a20250114__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- graphscope/flex/rest/__init__.py +59 -44
- graphscope/flex/rest/api/__init__.py +2 -4
- graphscope/flex/rest/api/alert_api.py +721 -394
- graphscope/flex/rest/api/{legacy_api.py → data_source_api.py} +260 -189
- graphscope/flex/rest/api/deployment_api.py +388 -138
- graphscope/flex/rest/api/graph_api.py +858 -260
- graphscope/flex/rest/api/job_api.py +286 -203
- graphscope/flex/rest/api/service_api.py +320 -39
- graphscope/flex/rest/api/{procedure_api.py → stored_procedure_api.py} +296 -237
- graphscope/flex/rest/api/utils_api.py +18 -13
- graphscope/flex/rest/api_client.py +60 -30
- graphscope/flex/rest/configuration.py +19 -5
- graphscope/flex/rest/exceptions.py +2 -2
- graphscope/flex/rest/models/__init__.py +57 -40
- graphscope/flex/rest/models/{vertex_type.py → base_edge_type.py} +25 -25
- graphscope/flex/rest/models/{edge_type_vertex_type_pair_relations_inner.py → base_edge_type_vertex_type_pair_relations_inner.py} +17 -17
- graphscope/flex/rest/models/{edge_type_vertex_type_pair_relations_inner_x_csr_params.py → base_edge_type_vertex_type_pair_relations_inner_x_csr_params.py} +11 -11
- graphscope/flex/rest/models/{model_property.py → base_property_meta.py} +28 -19
- graphscope/flex/rest/models/base_vertex_type.py +96 -0
- graphscope/flex/rest/models/{procedure_params_inner.py → base_vertex_type_x_csr_params.py} +15 -17
- graphscope/flex/rest/models/column_mapping.py +13 -13
- graphscope/flex/rest/models/{edge_mapping_source_vertex_mappings_inner_column.py → column_mapping_column.py} +12 -12
- graphscope/flex/rest/models/{schema_mapping_loading_config_data_source.py → create_alert_receiver_request.py} +29 -24
- graphscope/flex/rest/models/{alert_rule.py → create_alert_rule_request.py} +19 -25
- graphscope/flex/rest/models/create_dataloading_job_response.py +88 -0
- graphscope/flex/rest/models/create_edge_type.py +114 -0
- graphscope/flex/rest/models/{graph.py → create_graph_request.py} +27 -33
- graphscope/flex/rest/models/create_graph_response.py +88 -0
- graphscope/flex/rest/models/{model_schema.py → create_graph_schema_request.py} +25 -25
- graphscope/flex/rest/models/{groot_vertex_type.py → create_property_meta.py} +32 -25
- graphscope/flex/rest/models/{graph_stored_procedures.py → create_stored_proc_request.py} +26 -23
- graphscope/flex/rest/models/create_stored_proc_response.py +88 -0
- graphscope/flex/rest/models/create_vertex_type.py +108 -0
- graphscope/flex/rest/models/{groot_dataloading_job_config.py → dataloading_job_config.py} +45 -21
- graphscope/flex/rest/models/{groot_dataloading_job_config_edges_inner.py → dataloading_job_config_edges_inner.py} +12 -12
- graphscope/flex/rest/models/{schema_mapping_loading_config.py → dataloading_job_config_loading_config.py} +16 -22
- graphscope/flex/rest/models/{schema_mapping_loading_config_format.py → dataloading_job_config_loading_config_format.py} +12 -12
- graphscope/flex/rest/models/{groot_edge_type_relations_inner.py → dataloading_job_config_vertices_inner.py} +15 -17
- graphscope/flex/rest/models/dataloading_mr_job_config.py +88 -0
- graphscope/flex/rest/models/date_type.py +88 -0
- graphscope/flex/rest/models/edge_mapping.py +23 -25
- graphscope/flex/rest/models/edge_mapping_type_triplet.py +12 -12
- graphscope/flex/rest/models/error.py +90 -0
- graphscope/flex/rest/models/{alert_message.py → get_alert_message_response.py} +23 -32
- graphscope/flex/rest/models/{alert_receiver.py → get_alert_receiver_response.py} +22 -25
- graphscope/flex/rest/models/{connection_status.py → get_alert_rule_response.py} +37 -33
- graphscope/flex/rest/models/{edge_type.py → get_edge_type.py} +33 -27
- graphscope/flex/rest/models/get_graph_response.py +139 -0
- graphscope/flex/rest/models/{groot_schema.py → get_graph_schema_response.py} +32 -32
- graphscope/flex/rest/models/get_pod_log_response.py +88 -0
- graphscope/flex/rest/models/{edge_mapping_destination_vertex_mappings_inner.py → get_property_meta.py} +34 -19
- graphscope/flex/rest/models/get_resource_usage_response.py +105 -0
- graphscope/flex/rest/models/get_storage_usage_response.py +88 -0
- graphscope/flex/rest/models/{procedure.py → get_stored_proc_response.py} +37 -36
- graphscope/flex/rest/models/{groot_edge_type.py → get_vertex_type.py} +33 -31
- graphscope/flex/rest/models/gs_data_type.py +152 -0
- graphscope/flex/rest/models/job_status.py +14 -17
- graphscope/flex/rest/models/{connection.py → long_text.py} +20 -15
- graphscope/flex/rest/models/node_status.py +15 -15
- graphscope/flex/rest/models/parameter.py +96 -0
- graphscope/flex/rest/models/{deployment_info_graphs_info_value.py → pod_status.py} +34 -20
- graphscope/flex/rest/models/{property_property_type.py → primitive_type.py} +16 -19
- graphscope/flex/rest/models/resource_usage.py +92 -0
- graphscope/flex/rest/models/{deployment_info.py → running_deployment_info.py} +42 -45
- graphscope/flex/rest/models/running_deployment_status.py +124 -0
- graphscope/flex/rest/models/schema_mapping.py +18 -26
- graphscope/flex/rest/models/service_status.py +29 -13
- graphscope/flex/rest/models/service_status_sdk_endpoints.py +8 -8
- graphscope/flex/rest/models/start_service_request.py +11 -11
- graphscope/flex/rest/models/{groot_graph.py → stored_procedure_meta.py} +46 -36
- graphscope/flex/rest/models/string_type.py +92 -0
- graphscope/flex/rest/models/string_type_string.py +124 -0
- graphscope/flex/rest/models/temporal_type.py +92 -0
- graphscope/flex/rest/models/temporal_type_temporal.py +138 -0
- graphscope/flex/rest/models/time_stamp_type.py +88 -0
- graphscope/flex/rest/models/update_alert_message_status_request.py +97 -0
- graphscope/flex/rest/models/update_stored_proc_request.py +88 -0
- graphscope/flex/rest/models/upload_file_response.py +90 -0
- graphscope/flex/rest/models/vertex_mapping.py +13 -13
- graphscope/flex/rest/rest.py +4 -2
- graphscope_flex-0.29.0a20250114.dist-info/METADATA +19 -0
- graphscope_flex-0.29.0a20250114.dist-info/RECORD +86 -0
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.29.0a20250114.dist-info}/WHEEL +1 -1
- graphscope/flex/rest/api/connection_api.py +0 -550
- graphscope/flex/rest/api/datasource_api.py +0 -2308
- graphscope/flex/rest/models/data_source.py +0 -106
- graphscope/flex/rest/models/deployment_status.py +0 -108
- graphscope/flex/rest/models/edge_data_source.py +0 -112
- graphscope/flex/rest/models/edge_mapping_source_vertex_mappings_inner.py +0 -92
- graphscope/flex/rest/models/groot_graph_gremlin_interface.py +0 -94
- graphscope/flex/rest/models/groot_property.py +0 -104
- graphscope/flex/rest/models/update_alert_messages_request.py +0 -110
- graphscope/flex/rest/models/vertex_data_source.py +0 -104
- graphscope_flex-0.27.0.dist-info/METADATA +0 -17
- graphscope_flex-0.27.0.dist-info/RECORD +0 -71
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.29.0a20250114.dist-info}/top_level.txt +0 -0
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
GraphScope FLEX HTTP SERVICE API
|
5
5
|
|
6
|
-
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
6
|
+
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
7
7
|
|
8
|
-
The version of the OpenAPI document: 0.
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Contact: graphscope@alibaba-inc.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -18,33 +18,30 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
from pydantic import BaseModel, StrictStr, field_validator
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
23
23
|
from typing import Optional, Set
|
24
24
|
from typing_extensions import Self
|
25
25
|
|
26
|
-
class
|
26
|
+
class PrimitiveType(BaseModel):
|
27
27
|
"""
|
28
|
-
|
28
|
+
PrimitiveType
|
29
29
|
""" # noqa: E501
|
30
|
-
primitive_type:
|
30
|
+
primitive_type: StrictStr
|
31
31
|
__properties: ClassVar[List[str]] = ["primitive_type"]
|
32
32
|
|
33
33
|
@field_validator('primitive_type')
|
34
34
|
def primitive_type_validate_enum(cls, value):
|
35
35
|
"""Validates the enum"""
|
36
|
-
if value
|
37
|
-
|
38
|
-
|
39
|
-
if value not in set(['DT_DOUBLE', 'DT_STRING', 'DT_SIGNED_INT32', 'DT_SIGNED_INT64', 'DT_DATE32']):
|
40
|
-
raise ValueError("must be one of enum values ('DT_DOUBLE', 'DT_STRING', 'DT_SIGNED_INT32', 'DT_SIGNED_INT64', 'DT_DATE32')")
|
36
|
+
if value not in set(['DT_SIGNED_INT32', 'DT_UNSIGNED_INT32', 'DT_SIGNED_INT64', 'DT_UNSIGNED_INT64', 'DT_BOOL', 'DT_FLOAT', 'DT_DOUBLE']):
|
37
|
+
raise ValueError("must be one of enum values ('DT_SIGNED_INT32', 'DT_UNSIGNED_INT32', 'DT_SIGNED_INT64', 'DT_UNSIGNED_INT64', 'DT_BOOL', 'DT_FLOAT', 'DT_DOUBLE')")
|
41
38
|
return value
|
42
39
|
|
43
|
-
model_config =
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
40
|
+
model_config = ConfigDict(
|
41
|
+
populate_by_name=True,
|
42
|
+
validate_assignment=True,
|
43
|
+
protected_namespaces=(),
|
44
|
+
)
|
48
45
|
|
49
46
|
|
50
47
|
def to_str(self) -> str:
|
@@ -58,7 +55,7 @@ class PropertyPropertyType(BaseModel):
|
|
58
55
|
|
59
56
|
@classmethod
|
60
57
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
61
|
-
"""Create an instance of
|
58
|
+
"""Create an instance of PrimitiveType from a JSON string"""
|
62
59
|
return cls.from_dict(json.loads(json_str))
|
63
60
|
|
64
61
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -83,7 +80,7 @@ class PropertyPropertyType(BaseModel):
|
|
83
80
|
|
84
81
|
@classmethod
|
85
82
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
86
|
-
"""Create an instance of
|
83
|
+
"""Create an instance of PrimitiveType from a dict"""
|
87
84
|
if obj is None:
|
88
85
|
return None
|
89
86
|
|
@@ -0,0 +1,92 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
GraphScope FLEX HTTP SERVICE API
|
5
|
+
|
6
|
+
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: graphscope@alibaba-inc.com
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class ResourceUsage(BaseModel):
|
27
|
+
"""
|
28
|
+
ResourceUsage
|
29
|
+
""" # noqa: E501
|
30
|
+
host: StrictStr
|
31
|
+
timestamp: StrictStr
|
32
|
+
usage: StrictStr
|
33
|
+
__properties: ClassVar[List[str]] = ["host", "timestamp", "usage"]
|
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 ResourceUsage 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 ResourceUsage 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
|
+
"host": obj.get("host"),
|
87
|
+
"timestamp": obj.get("timestamp"),
|
88
|
+
"usage": obj.get("usage")
|
89
|
+
})
|
90
|
+
return _obj
|
91
|
+
|
92
|
+
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
GraphScope FLEX HTTP SERVICE API
|
5
5
|
|
6
|
-
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
6
|
+
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
7
7
|
|
8
|
-
The version of the OpenAPI document: 0.
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Contact: graphscope@alibaba-inc.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -18,49 +18,57 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
from pydantic import BaseModel, StrictStr, field_validator
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
23
|
-
from graphscope.flex.rest.models.deployment_info_graphs_info_value import DeploymentInfoGraphsInfoValue
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
24
23
|
from typing import Optional, Set
|
25
24
|
from typing_extensions import Self
|
26
25
|
|
27
|
-
class
|
26
|
+
class RunningDeploymentInfo(BaseModel):
|
28
27
|
"""
|
29
|
-
|
28
|
+
RunningDeploymentInfo
|
30
29
|
""" # noqa: E501
|
31
|
-
|
32
|
-
cluster_type:
|
33
|
-
version:
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
30
|
+
instance_name: StrictStr
|
31
|
+
cluster_type: StrictStr
|
32
|
+
version: StrictStr
|
33
|
+
creation_time: StrictStr
|
34
|
+
frontend: StrictStr
|
35
|
+
engine: StrictStr
|
36
|
+
storage: StrictStr
|
37
|
+
__properties: ClassVar[List[str]] = ["instance_name", "cluster_type", "version", "creation_time", "frontend", "engine", "storage"]
|
38
38
|
|
39
39
|
@field_validator('cluster_type')
|
40
40
|
def cluster_type_validate_enum(cls, value):
|
41
41
|
"""Validates the enum"""
|
42
|
-
if value is None:
|
43
|
-
return value
|
44
|
-
|
45
42
|
if value not in set(['HOSTS', 'KUBERNETES']):
|
46
43
|
raise ValueError("must be one of enum values ('HOSTS', 'KUBERNETES')")
|
47
44
|
return value
|
48
45
|
|
49
|
-
@field_validator('
|
50
|
-
def
|
46
|
+
@field_validator('frontend')
|
47
|
+
def frontend_validate_enum(cls, value):
|
48
|
+
"""Validates the enum"""
|
49
|
+
if value not in set(['Cypher/Gremlin', 'AnalyticalApps']):
|
50
|
+
raise ValueError("must be one of enum values ('Cypher/Gremlin', 'AnalyticalApps')")
|
51
|
+
return value
|
52
|
+
|
53
|
+
@field_validator('engine')
|
54
|
+
def engine_validate_enum(cls, value):
|
51
55
|
"""Validates the enum"""
|
52
|
-
if value
|
53
|
-
|
56
|
+
if value not in set(['Hiactor', 'Gaia']):
|
57
|
+
raise ValueError("must be one of enum values ('Hiactor', 'Gaia')")
|
58
|
+
return value
|
54
59
|
|
55
|
-
|
56
|
-
|
60
|
+
@field_validator('storage')
|
61
|
+
def storage_validate_enum(cls, value):
|
62
|
+
"""Validates the enum"""
|
63
|
+
if value not in set(['MutableCSR', 'MutablePersistent']):
|
64
|
+
raise ValueError("must be one of enum values ('MutableCSR', 'MutablePersistent')")
|
57
65
|
return value
|
58
66
|
|
59
|
-
model_config =
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
67
|
+
model_config = ConfigDict(
|
68
|
+
populate_by_name=True,
|
69
|
+
validate_assignment=True,
|
70
|
+
protected_namespaces=(),
|
71
|
+
)
|
64
72
|
|
65
73
|
|
66
74
|
def to_str(self) -> str:
|
@@ -74,7 +82,7 @@ class DeploymentInfo(BaseModel):
|
|
74
82
|
|
75
83
|
@classmethod
|
76
84
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
77
|
-
"""Create an instance of
|
85
|
+
"""Create an instance of RunningDeploymentInfo from a JSON string"""
|
78
86
|
return cls.from_dict(json.loads(json_str))
|
79
87
|
|
80
88
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -95,18 +103,11 @@ class DeploymentInfo(BaseModel):
|
|
95
103
|
exclude=excluded_fields,
|
96
104
|
exclude_none=True,
|
97
105
|
)
|
98
|
-
# override the default output from pydantic by calling `to_dict()` of each value in graphs_info (dict)
|
99
|
-
_field_dict = {}
|
100
|
-
if self.graphs_info:
|
101
|
-
for _key in self.graphs_info:
|
102
|
-
if self.graphs_info[_key]:
|
103
|
-
_field_dict[_key] = self.graphs_info[_key].to_dict()
|
104
|
-
_dict['graphs_info'] = _field_dict
|
105
106
|
return _dict
|
106
107
|
|
107
108
|
@classmethod
|
108
109
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
109
|
-
"""Create an instance of
|
110
|
+
"""Create an instance of RunningDeploymentInfo from a dict"""
|
110
111
|
if obj is None:
|
111
112
|
return None
|
112
113
|
|
@@ -114,17 +115,13 @@ class DeploymentInfo(BaseModel):
|
|
114
115
|
return cls.model_validate(obj)
|
115
116
|
|
116
117
|
_obj = cls.model_validate({
|
117
|
-
"
|
118
|
+
"instance_name": obj.get("instance_name"),
|
118
119
|
"cluster_type": obj.get("cluster_type"),
|
119
120
|
"version": obj.get("version"),
|
120
|
-
"solution": obj.get("solution"),
|
121
121
|
"creation_time": obj.get("creation_time"),
|
122
|
-
"
|
123
|
-
|
124
|
-
|
125
|
-
)
|
126
|
-
if obj.get("graphs_info") is not None
|
127
|
-
else None
|
122
|
+
"frontend": obj.get("frontend"),
|
123
|
+
"engine": obj.get("engine"),
|
124
|
+
"storage": obj.get("storage")
|
128
125
|
})
|
129
126
|
return _obj
|
130
127
|
|
@@ -0,0 +1,124 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
GraphScope FLEX HTTP SERVICE API
|
5
|
+
|
6
|
+
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: graphscope@alibaba-inc.com
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from graphscope.flex.rest.models.node_status import NodeStatus
|
24
|
+
from graphscope.flex.rest.models.pod_status import PodStatus
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class RunningDeploymentStatus(BaseModel):
|
29
|
+
"""
|
30
|
+
RunningDeploymentStatus
|
31
|
+
""" # noqa: E501
|
32
|
+
cluster_type: StrictStr
|
33
|
+
nodes: Optional[List[NodeStatus]] = None
|
34
|
+
pods: Optional[Dict[str, List[PodStatus]]] = None
|
35
|
+
__properties: ClassVar[List[str]] = ["cluster_type", "nodes", "pods"]
|
36
|
+
|
37
|
+
@field_validator('cluster_type')
|
38
|
+
def cluster_type_validate_enum(cls, value):
|
39
|
+
"""Validates the enum"""
|
40
|
+
if value not in set(['HOSTS', 'KUBERNETES']):
|
41
|
+
raise ValueError("must be one of enum values ('HOSTS', 'KUBERNETES')")
|
42
|
+
return value
|
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 RunningDeploymentStatus 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 each item in nodes (list)
|
84
|
+
_items = []
|
85
|
+
if self.nodes:
|
86
|
+
for _item_nodes in self.nodes:
|
87
|
+
if _item_nodes:
|
88
|
+
_items.append(_item_nodes.to_dict())
|
89
|
+
_dict['nodes'] = _items
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of each value in pods (dict of array)
|
91
|
+
_field_dict_of_array = {}
|
92
|
+
if self.pods:
|
93
|
+
for _key_pods in self.pods:
|
94
|
+
if self.pods[_key_pods] is not None:
|
95
|
+
_field_dict_of_array[_key_pods] = [
|
96
|
+
_item.to_dict() for _item in self.pods[_key_pods]
|
97
|
+
]
|
98
|
+
_dict['pods'] = _field_dict_of_array
|
99
|
+
return _dict
|
100
|
+
|
101
|
+
@classmethod
|
102
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
103
|
+
"""Create an instance of RunningDeploymentStatus from a dict"""
|
104
|
+
if obj is None:
|
105
|
+
return None
|
106
|
+
|
107
|
+
if not isinstance(obj, dict):
|
108
|
+
return cls.model_validate(obj)
|
109
|
+
|
110
|
+
_obj = cls.model_validate({
|
111
|
+
"cluster_type": obj.get("cluster_type"),
|
112
|
+
"nodes": [NodeStatus.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None,
|
113
|
+
"pods": dict(
|
114
|
+
(_k,
|
115
|
+
[PodStatus.from_dict(_item) for _item in _v]
|
116
|
+
if _v is not None
|
117
|
+
else None
|
118
|
+
)
|
119
|
+
for _k, _v in obj.get("pods", {}).items()
|
120
|
+
)
|
121
|
+
})
|
122
|
+
return _obj
|
123
|
+
|
124
|
+
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
GraphScope FLEX HTTP SERVICE API
|
5
5
|
|
6
|
-
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
6
|
+
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
7
7
|
|
8
|
-
The version of the OpenAPI document: 0.
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Contact: graphscope@alibaba-inc.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -18,10 +18,9 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
from pydantic import BaseModel,
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
21
|
+
from pydantic import BaseModel, ConfigDict
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
23
23
|
from graphscope.flex.rest.models.edge_mapping import EdgeMapping
|
24
|
-
from graphscope.flex.rest.models.schema_mapping_loading_config import SchemaMappingLoadingConfig
|
25
24
|
from graphscope.flex.rest.models.vertex_mapping import VertexMapping
|
26
25
|
from typing import Optional, Set
|
27
26
|
from typing_extensions import Self
|
@@ -30,17 +29,15 @@ class SchemaMapping(BaseModel):
|
|
30
29
|
"""
|
31
30
|
SchemaMapping
|
32
31
|
""" # noqa: E501
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
edge_mappings: Optional[List[EdgeMapping]] = None
|
37
|
-
__properties: ClassVar[List[str]] = ["graph", "loading_config", "vertex_mappings", "edge_mappings"]
|
32
|
+
vertex_mappings: List[VertexMapping]
|
33
|
+
edge_mappings: List[EdgeMapping]
|
34
|
+
__properties: ClassVar[List[str]] = ["vertex_mappings", "edge_mappings"]
|
38
35
|
|
39
|
-
model_config =
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
36
|
+
model_config = ConfigDict(
|
37
|
+
populate_by_name=True,
|
38
|
+
validate_assignment=True,
|
39
|
+
protected_namespaces=(),
|
40
|
+
)
|
44
41
|
|
45
42
|
|
46
43
|
def to_str(self) -> str:
|
@@ -75,22 +72,19 @@ class SchemaMapping(BaseModel):
|
|
75
72
|
exclude=excluded_fields,
|
76
73
|
exclude_none=True,
|
77
74
|
)
|
78
|
-
# override the default output from pydantic by calling `to_dict()` of loading_config
|
79
|
-
if self.loading_config:
|
80
|
-
_dict['loading_config'] = self.loading_config.to_dict()
|
81
75
|
# override the default output from pydantic by calling `to_dict()` of each item in vertex_mappings (list)
|
82
76
|
_items = []
|
83
77
|
if self.vertex_mappings:
|
84
|
-
for
|
85
|
-
if
|
86
|
-
_items.append(
|
78
|
+
for _item_vertex_mappings in self.vertex_mappings:
|
79
|
+
if _item_vertex_mappings:
|
80
|
+
_items.append(_item_vertex_mappings.to_dict())
|
87
81
|
_dict['vertex_mappings'] = _items
|
88
82
|
# override the default output from pydantic by calling `to_dict()` of each item in edge_mappings (list)
|
89
83
|
_items = []
|
90
84
|
if self.edge_mappings:
|
91
|
-
for
|
92
|
-
if
|
93
|
-
_items.append(
|
85
|
+
for _item_edge_mappings in self.edge_mappings:
|
86
|
+
if _item_edge_mappings:
|
87
|
+
_items.append(_item_edge_mappings.to_dict())
|
94
88
|
_dict['edge_mappings'] = _items
|
95
89
|
return _dict
|
96
90
|
|
@@ -104,8 +98,6 @@ class SchemaMapping(BaseModel):
|
|
104
98
|
return cls.model_validate(obj)
|
105
99
|
|
106
100
|
_obj = cls.model_validate({
|
107
|
-
"graph": obj.get("graph"),
|
108
|
-
"loading_config": SchemaMappingLoadingConfig.from_dict(obj["loading_config"]) if obj.get("loading_config") is not None else None,
|
109
101
|
"vertex_mappings": [VertexMapping.from_dict(_item) for _item in obj["vertex_mappings"]] if obj.get("vertex_mappings") is not None else None,
|
110
102
|
"edge_mappings": [EdgeMapping.from_dict(_item) for _item in obj["edge_mappings"]] if obj.get("edge_mappings") is not None else None
|
111
103
|
})
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
GraphScope FLEX HTTP SERVICE API
|
5
5
|
|
6
|
-
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
6
|
+
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
7
7
|
|
8
|
-
The version of the OpenAPI document: 0.
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Contact: graphscope@alibaba-inc.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -18,7 +18,7 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
from pydantic import BaseModel,
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
23
23
|
from graphscope.flex.rest.models.service_status_sdk_endpoints import ServiceStatusSdkEndpoints
|
24
24
|
from typing import Optional, Set
|
@@ -28,16 +28,25 @@ class ServiceStatus(BaseModel):
|
|
28
28
|
"""
|
29
29
|
ServiceStatus
|
30
30
|
""" # noqa: E501
|
31
|
-
|
32
|
-
|
31
|
+
graph_id: StrictStr
|
32
|
+
status: StrictStr
|
33
33
|
sdk_endpoints: Optional[ServiceStatusSdkEndpoints] = None
|
34
|
-
|
34
|
+
info: Optional[StrictStr] = None
|
35
|
+
start_time: Optional[StrictStr] = None
|
36
|
+
__properties: ClassVar[List[str]] = ["graph_id", "status", "sdk_endpoints", "info", "start_time"]
|
35
37
|
|
36
|
-
|
37
|
-
|
38
|
-
"
|
39
|
-
|
40
|
-
|
38
|
+
@field_validator('status')
|
39
|
+
def status_validate_enum(cls, value):
|
40
|
+
"""Validates the enum"""
|
41
|
+
if value not in set(['Running', 'Stopped']):
|
42
|
+
raise ValueError("must be one of enum values ('Running', 'Stopped')")
|
43
|
+
return value
|
44
|
+
|
45
|
+
model_config = ConfigDict(
|
46
|
+
populate_by_name=True,
|
47
|
+
validate_assignment=True,
|
48
|
+
protected_namespaces=(),
|
49
|
+
)
|
41
50
|
|
42
51
|
|
43
52
|
def to_str(self) -> str:
|
@@ -75,6 +84,11 @@ class ServiceStatus(BaseModel):
|
|
75
84
|
# override the default output from pydantic by calling `to_dict()` of sdk_endpoints
|
76
85
|
if self.sdk_endpoints:
|
77
86
|
_dict['sdk_endpoints'] = self.sdk_endpoints.to_dict()
|
87
|
+
# set to None if info (nullable) is None
|
88
|
+
# and model_fields_set contains the field
|
89
|
+
if self.info is None and "info" in self.model_fields_set:
|
90
|
+
_dict['info'] = None
|
91
|
+
|
78
92
|
return _dict
|
79
93
|
|
80
94
|
@classmethod
|
@@ -87,9 +101,11 @@ class ServiceStatus(BaseModel):
|
|
87
101
|
return cls.model_validate(obj)
|
88
102
|
|
89
103
|
_obj = cls.model_validate({
|
104
|
+
"graph_id": obj.get("graph_id"),
|
90
105
|
"status": obj.get("status"),
|
91
|
-
"
|
92
|
-
"
|
106
|
+
"sdk_endpoints": ServiceStatusSdkEndpoints.from_dict(obj["sdk_endpoints"]) if obj.get("sdk_endpoints") is not None else None,
|
107
|
+
"info": obj.get("info"),
|
108
|
+
"start_time": obj.get("start_time")
|
93
109
|
})
|
94
110
|
return _obj
|
95
111
|
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
GraphScope FLEX HTTP SERVICE API
|
5
5
|
|
6
|
-
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
6
|
+
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
7
7
|
|
8
|
-
The version of the OpenAPI document: 0.
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Contact: graphscope@alibaba-inc.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -18,7 +18,7 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
from pydantic import BaseModel, StrictStr
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
23
23
|
from typing import Optional, Set
|
24
24
|
from typing_extensions import Self
|
@@ -33,11 +33,11 @@ class ServiceStatusSdkEndpoints(BaseModel):
|
|
33
33
|
grpc: Optional[StrictStr] = None
|
34
34
|
__properties: ClassVar[List[str]] = ["cypher", "gremlin", "hqps", "grpc"]
|
35
35
|
|
36
|
-
model_config =
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
36
|
+
model_config = ConfigDict(
|
37
|
+
populate_by_name=True,
|
38
|
+
validate_assignment=True,
|
39
|
+
protected_namespaces=(),
|
40
|
+
)
|
41
41
|
|
42
42
|
|
43
43
|
def to_str(self) -> str:
|