graphscope-flex 0.27.0__py2.py3-none-any.whl → 0.28.0a20240920__py2.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.
- 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/{groot_edge_type_relations_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/dataloading_job_config_vertices_inner.py +88 -0
- 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/{procedure_params_inner.py → parameter.py} +20 -16
- 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 +22 -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.28.0a20240920.dist-info/METADATA +19 -0
- graphscope_flex-0.28.0a20240920.dist-info/RECORD +86 -0
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0a20240920.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.28.0a20240920.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,31 +18,28 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
from pydantic import BaseModel, Field, StrictStr, field_validator
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, 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 GetAlertMessageResponse(BaseModel):
|
27
27
|
"""
|
28
|
-
|
28
|
+
GetAlertMessageResponse
|
29
29
|
""" # noqa: E501
|
30
|
-
|
31
|
-
alert_name:
|
32
|
-
severity:
|
33
|
-
metric_type:
|
34
|
-
target:
|
35
|
-
trigger_time:
|
36
|
-
status:
|
37
|
-
message:
|
38
|
-
__properties: ClassVar[List[str]] = ["
|
30
|
+
id: StrictStr = Field(description="Generated in server side")
|
31
|
+
alert_name: StrictStr
|
32
|
+
severity: StrictStr
|
33
|
+
metric_type: StrictStr
|
34
|
+
target: List[StrictStr]
|
35
|
+
trigger_time: StrictStr
|
36
|
+
status: StrictStr
|
37
|
+
message: StrictStr
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "alert_name", "severity", "metric_type", "target", "trigger_time", "status", "message"]
|
39
39
|
|
40
40
|
@field_validator('severity')
|
41
41
|
def severity_validate_enum(cls, value):
|
42
42
|
"""Validates the enum"""
|
43
|
-
if value is None:
|
44
|
-
return value
|
45
|
-
|
46
43
|
if value not in set(['warning', 'emergency']):
|
47
44
|
raise ValueError("must be one of enum values ('warning', 'emergency')")
|
48
45
|
return value
|
@@ -50,9 +47,6 @@ class AlertMessage(BaseModel):
|
|
50
47
|
@field_validator('metric_type')
|
51
48
|
def metric_type_validate_enum(cls, value):
|
52
49
|
"""Validates the enum"""
|
53
|
-
if value is None:
|
54
|
-
return value
|
55
|
-
|
56
50
|
if value not in set(['node', 'service']):
|
57
51
|
raise ValueError("must be one of enum values ('node', 'service')")
|
58
52
|
return value
|
@@ -60,18 +54,15 @@ class AlertMessage(BaseModel):
|
|
60
54
|
@field_validator('status')
|
61
55
|
def status_validate_enum(cls, value):
|
62
56
|
"""Validates the enum"""
|
63
|
-
if value is None:
|
64
|
-
return value
|
65
|
-
|
66
57
|
if value not in set(['unsolved', 'solved', 'dealing']):
|
67
58
|
raise ValueError("must be one of enum values ('unsolved', 'solved', 'dealing')")
|
68
59
|
return value
|
69
60
|
|
70
|
-
model_config =
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
61
|
+
model_config = ConfigDict(
|
62
|
+
populate_by_name=True,
|
63
|
+
validate_assignment=True,
|
64
|
+
protected_namespaces=(),
|
65
|
+
)
|
75
66
|
|
76
67
|
|
77
68
|
def to_str(self) -> str:
|
@@ -85,7 +76,7 @@ class AlertMessage(BaseModel):
|
|
85
76
|
|
86
77
|
@classmethod
|
87
78
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
88
|
-
"""Create an instance of
|
79
|
+
"""Create an instance of GetAlertMessageResponse from a JSON string"""
|
89
80
|
return cls.from_dict(json.loads(json_str))
|
90
81
|
|
91
82
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -110,7 +101,7 @@ class AlertMessage(BaseModel):
|
|
110
101
|
|
111
102
|
@classmethod
|
112
103
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
113
|
-
"""Create an instance of
|
104
|
+
"""Create an instance of GetAlertMessageResponse from a dict"""
|
114
105
|
if obj is None:
|
115
106
|
return None
|
116
107
|
|
@@ -118,7 +109,7 @@ class AlertMessage(BaseModel):
|
|
118
109
|
return cls.model_validate(obj)
|
119
110
|
|
120
111
|
_obj = cls.model_validate({
|
121
|
-
"
|
112
|
+
"id": obj.get("id"),
|
122
113
|
"alert_name": obj.get("alert_name"),
|
123
114
|
"severity": obj.get("severity"),
|
124
115
|
"metric_type": obj.get("metric_type"),
|
@@ -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,39 +18,36 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, 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 GetAlertReceiverResponse(BaseModel):
|
27
27
|
"""
|
28
|
-
|
28
|
+
GetAlertReceiverResponse
|
29
29
|
""" # noqa: E501
|
30
|
-
type:
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
message:
|
37
|
-
__properties: ClassVar[List[str]] = ["type", "
|
30
|
+
type: StrictStr
|
31
|
+
webhook_url: StrictStr
|
32
|
+
at_user_ids: List[StrictStr]
|
33
|
+
is_at_all: StrictBool
|
34
|
+
enable: StrictBool
|
35
|
+
id: StrictStr
|
36
|
+
message: StrictStr = Field(description="Error message generated in server side")
|
37
|
+
__properties: ClassVar[List[str]] = ["type", "webhook_url", "at_user_ids", "is_at_all", "enable", "id", "message"]
|
38
38
|
|
39
39
|
@field_validator('type')
|
40
40
|
def 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(['webhook']):
|
46
43
|
raise ValueError("must be one of enum values ('webhook')")
|
47
44
|
return value
|
48
45
|
|
49
|
-
model_config =
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
46
|
+
model_config = ConfigDict(
|
47
|
+
populate_by_name=True,
|
48
|
+
validate_assignment=True,
|
49
|
+
protected_namespaces=(),
|
50
|
+
)
|
54
51
|
|
55
52
|
|
56
53
|
def to_str(self) -> str:
|
@@ -64,7 +61,7 @@ class AlertReceiver(BaseModel):
|
|
64
61
|
|
65
62
|
@classmethod
|
66
63
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
67
|
-
"""Create an instance of
|
64
|
+
"""Create an instance of GetAlertReceiverResponse from a JSON string"""
|
68
65
|
return cls.from_dict(json.loads(json_str))
|
69
66
|
|
70
67
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -89,7 +86,7 @@ class AlertReceiver(BaseModel):
|
|
89
86
|
|
90
87
|
@classmethod
|
91
88
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
92
|
-
"""Create an instance of
|
89
|
+
"""Create an instance of GetAlertReceiverResponse from a dict"""
|
93
90
|
if obj is None:
|
94
91
|
return None
|
95
92
|
|
@@ -98,11 +95,11 @@ class AlertReceiver(BaseModel):
|
|
98
95
|
|
99
96
|
_obj = cls.model_validate({
|
100
97
|
"type": obj.get("type"),
|
101
|
-
"receiver_id": obj.get("receiver_id"),
|
102
98
|
"webhook_url": obj.get("webhook_url"),
|
103
99
|
"at_user_ids": obj.get("at_user_ids"),
|
104
100
|
"is_at_all": obj.get("is_at_all"),
|
105
101
|
"enable": obj.get("enable"),
|
102
|
+
"id": obj.get("id"),
|
106
103
|
"message": obj.get("message")
|
107
104
|
})
|
108
105
|
return _obj
|
@@ -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,44 +18,43 @@ 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, Field, StrictBool, StrictInt, 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 GetAlertRuleResponse(BaseModel):
|
27
27
|
"""
|
28
|
-
|
28
|
+
GetAlertRuleResponse
|
29
29
|
""" # noqa: E501
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
30
|
+
name: StrictStr
|
31
|
+
severity: StrictStr
|
32
|
+
metric_type: StrictStr
|
33
|
+
conditions_description: StrictStr
|
34
|
+
frequency: StrictInt = Field(description="(mins)")
|
35
|
+
enable: StrictBool
|
36
|
+
id: StrictStr
|
37
|
+
__properties: ClassVar[List[str]] = ["name", "severity", "metric_type", "conditions_description", "frequency", "enable", "id"]
|
38
|
+
|
39
|
+
@field_validator('severity')
|
40
|
+
def severity_validate_enum(cls, value):
|
36
41
|
"""Validates the enum"""
|
37
|
-
if value
|
38
|
-
|
39
|
-
|
40
|
-
if value not in set(['CONNECTED']):
|
41
|
-
raise ValueError("must be one of enum values ('CONNECTED')")
|
42
|
+
if value not in set(['warning', 'emergency']):
|
43
|
+
raise ValueError("must be one of enum values ('warning', 'emergency')")
|
42
44
|
return value
|
43
45
|
|
44
|
-
@field_validator('
|
45
|
-
def
|
46
|
+
@field_validator('metric_type')
|
47
|
+
def metric_type_validate_enum(cls, value):
|
46
48
|
"""Validates the enum"""
|
47
|
-
if value
|
48
|
-
|
49
|
-
|
50
|
-
if value not in set(['INTERACTIVE', 'GRAPHSCOPE_INSIGHT']):
|
51
|
-
raise ValueError("must be one of enum values ('INTERACTIVE', 'GRAPHSCOPE_INSIGHT')")
|
49
|
+
if value not in set(['node', 'service']):
|
50
|
+
raise ValueError("must be one of enum values ('node', 'service')")
|
52
51
|
return value
|
53
52
|
|
54
|
-
model_config =
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
53
|
+
model_config = ConfigDict(
|
54
|
+
populate_by_name=True,
|
55
|
+
validate_assignment=True,
|
56
|
+
protected_namespaces=(),
|
57
|
+
)
|
59
58
|
|
60
59
|
|
61
60
|
def to_str(self) -> str:
|
@@ -69,7 +68,7 @@ class ConnectionStatus(BaseModel):
|
|
69
68
|
|
70
69
|
@classmethod
|
71
70
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
72
|
-
"""Create an instance of
|
71
|
+
"""Create an instance of GetAlertRuleResponse from a JSON string"""
|
73
72
|
return cls.from_dict(json.loads(json_str))
|
74
73
|
|
75
74
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -94,7 +93,7 @@ class ConnectionStatus(BaseModel):
|
|
94
93
|
|
95
94
|
@classmethod
|
96
95
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
97
|
-
"""Create an instance of
|
96
|
+
"""Create an instance of GetAlertRuleResponse from a dict"""
|
98
97
|
if obj is None:
|
99
98
|
return None
|
100
99
|
|
@@ -102,8 +101,13 @@ class ConnectionStatus(BaseModel):
|
|
102
101
|
return cls.model_validate(obj)
|
103
102
|
|
104
103
|
_obj = cls.model_validate({
|
105
|
-
"
|
106
|
-
"
|
104
|
+
"name": obj.get("name"),
|
105
|
+
"severity": obj.get("severity"),
|
106
|
+
"metric_type": obj.get("metric_type"),
|
107
|
+
"conditions_description": obj.get("conditions_description"),
|
108
|
+
"frequency": obj.get("frequency"),
|
109
|
+
"enable": obj.get("enable"),
|
110
|
+
"id": obj.get("id")
|
107
111
|
})
|
108
112
|
return _obj
|
109
113
|
|
@@ -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,28 +18,31 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
from pydantic import BaseModel, StrictInt, StrictStr
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
-
from graphscope.flex.rest.models.
|
24
|
-
from graphscope.flex.rest.models.
|
23
|
+
from graphscope.flex.rest.models.base_edge_type_vertex_type_pair_relations_inner import BaseEdgeTypeVertexTypePairRelationsInner
|
24
|
+
from graphscope.flex.rest.models.get_property_meta import GetPropertyMeta
|
25
25
|
from typing import Optional, Set
|
26
26
|
from typing_extensions import Self
|
27
27
|
|
28
|
-
class
|
28
|
+
class GetEdgeType(BaseModel):
|
29
29
|
"""
|
30
|
-
|
30
|
+
GetEdgeType
|
31
31
|
""" # noqa: E501
|
32
|
+
type_name: StrictStr
|
33
|
+
vertex_type_pair_relations: List[BaseEdgeTypeVertexTypePairRelationsInner]
|
34
|
+
directed: Optional[StrictBool] = None
|
35
|
+
primary_keys: Optional[List[StrictStr]] = None
|
32
36
|
type_id: Optional[StrictInt] = None
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
__properties: ClassVar[List[str]] = ["type_id", "type_name", "vertex_type_pair_relations", "properties"]
|
37
|
+
properties: Optional[List[GetPropertyMeta]] = None
|
38
|
+
description: Optional[StrictStr] = None
|
39
|
+
__properties: ClassVar[List[str]] = ["type_name", "vertex_type_pair_relations", "directed", "primary_keys", "type_id", "properties", "description"]
|
37
40
|
|
38
|
-
model_config =
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
41
|
+
model_config = ConfigDict(
|
42
|
+
populate_by_name=True,
|
43
|
+
validate_assignment=True,
|
44
|
+
protected_namespaces=(),
|
45
|
+
)
|
43
46
|
|
44
47
|
|
45
48
|
def to_str(self) -> str:
|
@@ -53,7 +56,7 @@ class EdgeType(BaseModel):
|
|
53
56
|
|
54
57
|
@classmethod
|
55
58
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
56
|
-
"""Create an instance of
|
59
|
+
"""Create an instance of GetEdgeType from a JSON string"""
|
57
60
|
return cls.from_dict(json.loads(json_str))
|
58
61
|
|
59
62
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -77,22 +80,22 @@ class EdgeType(BaseModel):
|
|
77
80
|
# override the default output from pydantic by calling `to_dict()` of each item in vertex_type_pair_relations (list)
|
78
81
|
_items = []
|
79
82
|
if self.vertex_type_pair_relations:
|
80
|
-
for
|
81
|
-
if
|
82
|
-
_items.append(
|
83
|
+
for _item_vertex_type_pair_relations in self.vertex_type_pair_relations:
|
84
|
+
if _item_vertex_type_pair_relations:
|
85
|
+
_items.append(_item_vertex_type_pair_relations.to_dict())
|
83
86
|
_dict['vertex_type_pair_relations'] = _items
|
84
87
|
# override the default output from pydantic by calling `to_dict()` of each item in properties (list)
|
85
88
|
_items = []
|
86
89
|
if self.properties:
|
87
|
-
for
|
88
|
-
if
|
89
|
-
_items.append(
|
90
|
+
for _item_properties in self.properties:
|
91
|
+
if _item_properties:
|
92
|
+
_items.append(_item_properties.to_dict())
|
90
93
|
_dict['properties'] = _items
|
91
94
|
return _dict
|
92
95
|
|
93
96
|
@classmethod
|
94
97
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
95
|
-
"""Create an instance of
|
98
|
+
"""Create an instance of GetEdgeType from a dict"""
|
96
99
|
if obj is None:
|
97
100
|
return None
|
98
101
|
|
@@ -100,10 +103,13 @@ class EdgeType(BaseModel):
|
|
100
103
|
return cls.model_validate(obj)
|
101
104
|
|
102
105
|
_obj = cls.model_validate({
|
103
|
-
"type_id": obj.get("type_id"),
|
104
106
|
"type_name": obj.get("type_name"),
|
105
|
-
"vertex_type_pair_relations": [
|
106
|
-
"
|
107
|
+
"vertex_type_pair_relations": [BaseEdgeTypeVertexTypePairRelationsInner.from_dict(_item) for _item in obj["vertex_type_pair_relations"]] if obj.get("vertex_type_pair_relations") is not None else None,
|
108
|
+
"directed": obj.get("directed"),
|
109
|
+
"primary_keys": obj.get("primary_keys"),
|
110
|
+
"type_id": obj.get("type_id"),
|
111
|
+
"properties": [GetPropertyMeta.from_dict(_item) for _item in obj["properties"]] if obj.get("properties") is not None else None,
|
112
|
+
"description": obj.get("description")
|
107
113
|
})
|
108
114
|
return _obj
|
109
115
|
|
@@ -0,0 +1,139 @@
|
|
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, Field, StrictStr, field_validator
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from graphscope.flex.rest.models.get_graph_schema_response import GetGraphSchemaResponse
|
24
|
+
from graphscope.flex.rest.models.get_stored_proc_response import GetStoredProcResponse
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class GetGraphResponse(BaseModel):
|
29
|
+
"""
|
30
|
+
GetGraphResponse
|
31
|
+
""" # noqa: E501
|
32
|
+
id: StrictStr
|
33
|
+
name: StrictStr
|
34
|
+
description: Optional[StrictStr] = None
|
35
|
+
store_type: Optional[StrictStr] = None
|
36
|
+
creation_time: StrictStr
|
37
|
+
data_update_time: StrictStr
|
38
|
+
schema_update_time: StrictStr
|
39
|
+
stored_procedures: Optional[List[GetStoredProcResponse]] = None
|
40
|
+
var_schema: GetGraphSchemaResponse = Field(alias="schema")
|
41
|
+
additional_properties: Dict[str, Any] = {}
|
42
|
+
__properties: ClassVar[List[str]] = ["id", "name", "description", "store_type", "creation_time", "data_update_time", "schema_update_time", "stored_procedures", "schema"]
|
43
|
+
|
44
|
+
@field_validator('store_type')
|
45
|
+
def store_type_validate_enum(cls, value):
|
46
|
+
"""Validates the enum"""
|
47
|
+
if value is None:
|
48
|
+
return value
|
49
|
+
|
50
|
+
if value not in set(['mutable_csr']):
|
51
|
+
raise ValueError("must be one of enum values ('mutable_csr')")
|
52
|
+
return value
|
53
|
+
|
54
|
+
model_config = ConfigDict(
|
55
|
+
populate_by_name=True,
|
56
|
+
validate_assignment=True,
|
57
|
+
protected_namespaces=(),
|
58
|
+
)
|
59
|
+
|
60
|
+
|
61
|
+
def to_str(self) -> str:
|
62
|
+
"""Returns the string representation of the model using alias"""
|
63
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
64
|
+
|
65
|
+
def to_json(self) -> str:
|
66
|
+
"""Returns the JSON representation of the model using alias"""
|
67
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
68
|
+
return json.dumps(self.to_dict())
|
69
|
+
|
70
|
+
@classmethod
|
71
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
72
|
+
"""Create an instance of GetGraphResponse from a JSON string"""
|
73
|
+
return cls.from_dict(json.loads(json_str))
|
74
|
+
|
75
|
+
def to_dict(self) -> Dict[str, Any]:
|
76
|
+
"""Return the dictionary representation of the model using alias.
|
77
|
+
|
78
|
+
This has the following differences from calling pydantic's
|
79
|
+
`self.model_dump(by_alias=True)`:
|
80
|
+
|
81
|
+
* `None` is only added to the output dict for nullable fields that
|
82
|
+
were set at model initialization. Other fields with value `None`
|
83
|
+
are ignored.
|
84
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
85
|
+
"""
|
86
|
+
excluded_fields: Set[str] = set([
|
87
|
+
"additional_properties",
|
88
|
+
])
|
89
|
+
|
90
|
+
_dict = self.model_dump(
|
91
|
+
by_alias=True,
|
92
|
+
exclude=excluded_fields,
|
93
|
+
exclude_none=True,
|
94
|
+
)
|
95
|
+
# override the default output from pydantic by calling `to_dict()` of each item in stored_procedures (list)
|
96
|
+
_items = []
|
97
|
+
if self.stored_procedures:
|
98
|
+
for _item_stored_procedures in self.stored_procedures:
|
99
|
+
if _item_stored_procedures:
|
100
|
+
_items.append(_item_stored_procedures.to_dict())
|
101
|
+
_dict['stored_procedures'] = _items
|
102
|
+
# override the default output from pydantic by calling `to_dict()` of var_schema
|
103
|
+
if self.var_schema:
|
104
|
+
_dict['schema'] = self.var_schema.to_dict()
|
105
|
+
# puts key-value pairs in additional_properties in the top level
|
106
|
+
if self.additional_properties is not None:
|
107
|
+
for _key, _value in self.additional_properties.items():
|
108
|
+
_dict[_key] = _value
|
109
|
+
|
110
|
+
return _dict
|
111
|
+
|
112
|
+
@classmethod
|
113
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
114
|
+
"""Create an instance of GetGraphResponse from a dict"""
|
115
|
+
if obj is None:
|
116
|
+
return None
|
117
|
+
|
118
|
+
if not isinstance(obj, dict):
|
119
|
+
return cls.model_validate(obj)
|
120
|
+
|
121
|
+
_obj = cls.model_validate({
|
122
|
+
"id": obj.get("id"),
|
123
|
+
"name": obj.get("name"),
|
124
|
+
"description": obj.get("description"),
|
125
|
+
"store_type": obj.get("store_type"),
|
126
|
+
"creation_time": obj.get("creation_time"),
|
127
|
+
"data_update_time": obj.get("data_update_time"),
|
128
|
+
"schema_update_time": obj.get("schema_update_time"),
|
129
|
+
"stored_procedures": [GetStoredProcResponse.from_dict(_item) for _item in obj["stored_procedures"]] if obj.get("stored_procedures") is not None else None,
|
130
|
+
"schema": GetGraphSchemaResponse.from_dict(obj["schema"]) if obj.get("schema") is not None else None
|
131
|
+
})
|
132
|
+
# store additional fields in additional_properties
|
133
|
+
for _key in obj.keys():
|
134
|
+
if _key not in cls.__properties:
|
135
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
136
|
+
|
137
|
+
return _obj
|
138
|
+
|
139
|
+
|