gsctl 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 +106 -0
- graphscope/flex/rest/api/__init__.py +12 -0
- graphscope/flex/rest/api/alert_api.py +2790 -0
- graphscope/flex/rest/api/data_source_api.py +1177 -0
- graphscope/flex/rest/api/deployment_api.py +1323 -0
- graphscope/flex/rest/api/graph_api.py +2813 -0
- graphscope/flex/rest/api/job_api.py +1408 -0
- graphscope/flex/rest/api/service_api.py +1316 -0
- graphscope/flex/rest/api/stored_procedure_api.py +1454 -0
- graphscope/flex/rest/api/utils_api.py +310 -0
- graphscope/flex/rest/api_client.py +789 -0
- graphscope/flex/rest/api_response.py +21 -0
- graphscope/flex/rest/configuration.py +451 -0
- graphscope/flex/rest/exceptions.py +200 -0
- graphscope/flex/rest/models/__init__.py +82 -0
- graphscope/flex/rest/models/base_edge_type.py +102 -0
- graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner.py +108 -0
- graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner_x_csr_params.py +98 -0
- graphscope/flex/rest/models/base_property_meta.py +105 -0
- graphscope/flex/rest/models/base_vertex_type.py +96 -0
- graphscope/flex/rest/models/base_vertex_type_x_csr_params.py +88 -0
- graphscope/flex/rest/models/column_mapping.py +94 -0
- graphscope/flex/rest/models/column_mapping_column.py +90 -0
- graphscope/flex/rest/models/create_alert_receiver_request.py +103 -0
- graphscope/flex/rest/models/create_alert_rule_request.py +112 -0
- 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/create_graph_request.py +106 -0
- graphscope/flex/rest/models/create_graph_response.py +88 -0
- graphscope/flex/rest/models/create_graph_schema_request.py +106 -0
- graphscope/flex/rest/models/create_property_meta.py +105 -0
- graphscope/flex/rest/models/create_stored_proc_request.py +101 -0
- 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/dataloading_job_config.py +136 -0
- graphscope/flex/rest/models/dataloading_job_config_edges_inner.py +92 -0
- graphscope/flex/rest/models/dataloading_job_config_loading_config.py +104 -0
- graphscope/flex/rest/models/dataloading_job_config_loading_config_format.py +90 -0
- 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 +122 -0
- graphscope/flex/rest/models/edge_mapping_type_triplet.py +92 -0
- graphscope/flex/rest/models/error.py +90 -0
- graphscope/flex/rest/models/get_alert_message_response.py +123 -0
- graphscope/flex/rest/models/get_alert_receiver_response.py +107 -0
- graphscope/flex/rest/models/get_alert_rule_response.py +114 -0
- graphscope/flex/rest/models/get_edge_type.py +116 -0
- graphscope/flex/rest/models/get_graph_response.py +139 -0
- graphscope/flex/rest/models/get_graph_schema_response.py +106 -0
- graphscope/flex/rest/models/get_pod_log_response.py +88 -0
- graphscope/flex/rest/models/get_property_meta.py +107 -0
- 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/get_stored_proc_response.py +130 -0
- graphscope/flex/rest/models/get_vertex_type.py +110 -0
- graphscope/flex/rest/models/gs_data_type.py +152 -0
- graphscope/flex/rest/models/job_status.py +107 -0
- graphscope/flex/rest/models/long_text.py +93 -0
- graphscope/flex/rest/models/node_status.py +94 -0
- graphscope/flex/rest/models/parameter.py +96 -0
- graphscope/flex/rest/models/pod_status.py +108 -0
- graphscope/flex/rest/models/primitive_type.py +95 -0
- graphscope/flex/rest/models/resource_usage.py +92 -0
- graphscope/flex/rest/models/running_deployment_info.py +128 -0
- graphscope/flex/rest/models/running_deployment_status.py +124 -0
- graphscope/flex/rest/models/schema_mapping.py +106 -0
- graphscope/flex/rest/models/service_status.py +112 -0
- graphscope/flex/rest/models/service_status_sdk_endpoints.py +94 -0
- graphscope/flex/rest/models/start_service_request.py +88 -0
- graphscope/flex/rest/models/stored_procedure_meta.py +126 -0
- 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 +100 -0
- graphscope/flex/rest/py.typed +0 -0
- graphscope/flex/rest/rest.py +258 -0
- graphscope/gsctl/V6D_VERSION +1 -0
- graphscope/gsctl/VERSION +1 -0
- graphscope/gsctl/__init__.py +22 -0
- graphscope/gsctl/commands/__init__.py +148 -0
- graphscope/gsctl/commands/common.py +200 -0
- graphscope/gsctl/commands/dev.py +448 -0
- graphscope/gsctl/commands/insight/__init__.py +17 -0
- graphscope/gsctl/commands/insight/glob.py +234 -0
- graphscope/gsctl/commands/insight/graph.py +205 -0
- graphscope/gsctl/commands/interactive/__init__.py +17 -0
- graphscope/gsctl/commands/interactive/glob.py +280 -0
- graphscope/gsctl/commands/interactive/graph.py +259 -0
- graphscope/gsctl/config.py +221 -0
- graphscope/gsctl/gsctl.py +51 -0
- graphscope/gsctl/impl/__init__.py +64 -0
- graphscope/gsctl/impl/alert.py +135 -0
- graphscope/gsctl/impl/common.py +53 -0
- graphscope/gsctl/impl/datasource.py +80 -0
- graphscope/gsctl/impl/deployment.py +62 -0
- graphscope/gsctl/impl/graph.py +150 -0
- graphscope/gsctl/impl/job.py +63 -0
- graphscope/gsctl/impl/service.py +62 -0
- graphscope/gsctl/impl/stored_procedure.py +92 -0
- graphscope/gsctl/impl/utils.py +38 -0
- graphscope/gsctl/scripts/install_deps.sh +969 -0
- graphscope/gsctl/tests/__init__.py +17 -0
- graphscope/gsctl/tests/test_graphscope_insight.py +401 -0
- graphscope/gsctl/tests/test_interactive.py +516 -0
- graphscope/gsctl/utils.py +337 -0
- graphscope/gsctl/version.py +31 -0
- gsctl-0.29.0a20250114.dist-info/METADATA +20 -0
- gsctl-0.29.0a20250114.dist-info/RECORD +117 -0
- gsctl-0.29.0a20250114.dist-info/WHEEL +6 -0
- gsctl-0.29.0a20250114.dist-info/entry_points.txt +3 -0
- gsctl-0.29.0a20250114.dist-info/top_level.txt +1 -0
@@ -0,0 +1,128 @@
|
|
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
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class RunningDeploymentInfo(BaseModel):
|
27
|
+
"""
|
28
|
+
RunningDeploymentInfo
|
29
|
+
""" # noqa: E501
|
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
|
+
|
39
|
+
@field_validator('cluster_type')
|
40
|
+
def cluster_type_validate_enum(cls, value):
|
41
|
+
"""Validates the enum"""
|
42
|
+
if value not in set(['HOSTS', 'KUBERNETES']):
|
43
|
+
raise ValueError("must be one of enum values ('HOSTS', 'KUBERNETES')")
|
44
|
+
return value
|
45
|
+
|
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):
|
55
|
+
"""Validates the enum"""
|
56
|
+
if value not in set(['Hiactor', 'Gaia']):
|
57
|
+
raise ValueError("must be one of enum values ('Hiactor', 'Gaia')")
|
58
|
+
return value
|
59
|
+
|
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')")
|
65
|
+
return value
|
66
|
+
|
67
|
+
model_config = ConfigDict(
|
68
|
+
populate_by_name=True,
|
69
|
+
validate_assignment=True,
|
70
|
+
protected_namespaces=(),
|
71
|
+
)
|
72
|
+
|
73
|
+
|
74
|
+
def to_str(self) -> str:
|
75
|
+
"""Returns the string representation of the model using alias"""
|
76
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
77
|
+
|
78
|
+
def to_json(self) -> str:
|
79
|
+
"""Returns the JSON representation of the model using alias"""
|
80
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
81
|
+
return json.dumps(self.to_dict())
|
82
|
+
|
83
|
+
@classmethod
|
84
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
85
|
+
"""Create an instance of RunningDeploymentInfo from a JSON string"""
|
86
|
+
return cls.from_dict(json.loads(json_str))
|
87
|
+
|
88
|
+
def to_dict(self) -> Dict[str, Any]:
|
89
|
+
"""Return the dictionary representation of the model using alias.
|
90
|
+
|
91
|
+
This has the following differences from calling pydantic's
|
92
|
+
`self.model_dump(by_alias=True)`:
|
93
|
+
|
94
|
+
* `None` is only added to the output dict for nullable fields that
|
95
|
+
were set at model initialization. Other fields with value `None`
|
96
|
+
are ignored.
|
97
|
+
"""
|
98
|
+
excluded_fields: Set[str] = set([
|
99
|
+
])
|
100
|
+
|
101
|
+
_dict = self.model_dump(
|
102
|
+
by_alias=True,
|
103
|
+
exclude=excluded_fields,
|
104
|
+
exclude_none=True,
|
105
|
+
)
|
106
|
+
return _dict
|
107
|
+
|
108
|
+
@classmethod
|
109
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
110
|
+
"""Create an instance of RunningDeploymentInfo from a dict"""
|
111
|
+
if obj is None:
|
112
|
+
return None
|
113
|
+
|
114
|
+
if not isinstance(obj, dict):
|
115
|
+
return cls.model_validate(obj)
|
116
|
+
|
117
|
+
_obj = cls.model_validate({
|
118
|
+
"instance_name": obj.get("instance_name"),
|
119
|
+
"cluster_type": obj.get("cluster_type"),
|
120
|
+
"version": obj.get("version"),
|
121
|
+
"creation_time": obj.get("creation_time"),
|
122
|
+
"frontend": obj.get("frontend"),
|
123
|
+
"engine": obj.get("engine"),
|
124
|
+
"storage": obj.get("storage")
|
125
|
+
})
|
126
|
+
return _obj
|
127
|
+
|
128
|
+
|
@@ -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
|
+
|
@@ -0,0 +1,106 @@
|
|
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
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
23
|
+
from graphscope.flex.rest.models.edge_mapping import EdgeMapping
|
24
|
+
from graphscope.flex.rest.models.vertex_mapping import VertexMapping
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class SchemaMapping(BaseModel):
|
29
|
+
"""
|
30
|
+
SchemaMapping
|
31
|
+
""" # noqa: E501
|
32
|
+
vertex_mappings: List[VertexMapping]
|
33
|
+
edge_mappings: List[EdgeMapping]
|
34
|
+
__properties: ClassVar[List[str]] = ["vertex_mappings", "edge_mappings"]
|
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 SchemaMapping 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 vertex_mappings (list)
|
76
|
+
_items = []
|
77
|
+
if self.vertex_mappings:
|
78
|
+
for _item_vertex_mappings in self.vertex_mappings:
|
79
|
+
if _item_vertex_mappings:
|
80
|
+
_items.append(_item_vertex_mappings.to_dict())
|
81
|
+
_dict['vertex_mappings'] = _items
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of each item in edge_mappings (list)
|
83
|
+
_items = []
|
84
|
+
if self.edge_mappings:
|
85
|
+
for _item_edge_mappings in self.edge_mappings:
|
86
|
+
if _item_edge_mappings:
|
87
|
+
_items.append(_item_edge_mappings.to_dict())
|
88
|
+
_dict['edge_mappings'] = _items
|
89
|
+
return _dict
|
90
|
+
|
91
|
+
@classmethod
|
92
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
93
|
+
"""Create an instance of SchemaMapping 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
|
+
"vertex_mappings": [VertexMapping.from_dict(_item) for _item in obj["vertex_mappings"]] if obj.get("vertex_mappings") is not None else None,
|
102
|
+
"edge_mappings": [EdgeMapping.from_dict(_item) for _item in obj["edge_mappings"]] if obj.get("edge_mappings") is not None else None
|
103
|
+
})
|
104
|
+
return _obj
|
105
|
+
|
106
|
+
|
@@ -0,0 +1,112 @@
|
|
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.service_status_sdk_endpoints import ServiceStatusSdkEndpoints
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class ServiceStatus(BaseModel):
|
28
|
+
"""
|
29
|
+
ServiceStatus
|
30
|
+
""" # noqa: E501
|
31
|
+
graph_id: StrictStr
|
32
|
+
status: StrictStr
|
33
|
+
sdk_endpoints: Optional[ServiceStatusSdkEndpoints] = None
|
34
|
+
info: Optional[StrictStr] = None
|
35
|
+
start_time: Optional[StrictStr] = None
|
36
|
+
__properties: ClassVar[List[str]] = ["graph_id", "status", "sdk_endpoints", "info", "start_time"]
|
37
|
+
|
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
|
+
)
|
50
|
+
|
51
|
+
|
52
|
+
def to_str(self) -> str:
|
53
|
+
"""Returns the string representation of the model using alias"""
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
55
|
+
|
56
|
+
def to_json(self) -> str:
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
59
|
+
return json.dumps(self.to_dict())
|
60
|
+
|
61
|
+
@classmethod
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
63
|
+
"""Create an instance of ServiceStatus from a JSON string"""
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
65
|
+
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
68
|
+
|
69
|
+
This has the following differences from calling pydantic's
|
70
|
+
`self.model_dump(by_alias=True)`:
|
71
|
+
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
73
|
+
were set at model initialization. Other fields with value `None`
|
74
|
+
are ignored.
|
75
|
+
"""
|
76
|
+
excluded_fields: Set[str] = set([
|
77
|
+
])
|
78
|
+
|
79
|
+
_dict = self.model_dump(
|
80
|
+
by_alias=True,
|
81
|
+
exclude=excluded_fields,
|
82
|
+
exclude_none=True,
|
83
|
+
)
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of sdk_endpoints
|
85
|
+
if self.sdk_endpoints:
|
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
|
+
|
92
|
+
return _dict
|
93
|
+
|
94
|
+
@classmethod
|
95
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
96
|
+
"""Create an instance of ServiceStatus from a dict"""
|
97
|
+
if obj is None:
|
98
|
+
return None
|
99
|
+
|
100
|
+
if not isinstance(obj, dict):
|
101
|
+
return cls.model_validate(obj)
|
102
|
+
|
103
|
+
_obj = cls.model_validate({
|
104
|
+
"graph_id": obj.get("graph_id"),
|
105
|
+
"status": obj.get("status"),
|
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")
|
109
|
+
})
|
110
|
+
return _obj
|
111
|
+
|
112
|
+
|
@@ -0,0 +1,94 @@
|
|
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, Optional
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class ServiceStatusSdkEndpoints(BaseModel):
|
27
|
+
"""
|
28
|
+
ServiceStatusSdkEndpoints
|
29
|
+
""" # noqa: E501
|
30
|
+
cypher: Optional[StrictStr] = None
|
31
|
+
gremlin: Optional[StrictStr] = None
|
32
|
+
hqps: Optional[StrictStr] = None
|
33
|
+
grpc: Optional[StrictStr] = None
|
34
|
+
__properties: ClassVar[List[str]] = ["cypher", "gremlin", "hqps", "grpc"]
|
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 ServiceStatusSdkEndpoints 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
|
+
return _dict
|
76
|
+
|
77
|
+
@classmethod
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
79
|
+
"""Create an instance of ServiceStatusSdkEndpoints from a dict"""
|
80
|
+
if obj is None:
|
81
|
+
return None
|
82
|
+
|
83
|
+
if not isinstance(obj, dict):
|
84
|
+
return cls.model_validate(obj)
|
85
|
+
|
86
|
+
_obj = cls.model_validate({
|
87
|
+
"cypher": obj.get("cypher"),
|
88
|
+
"gremlin": obj.get("gremlin"),
|
89
|
+
"hqps": obj.get("hqps"),
|
90
|
+
"grpc": obj.get("grpc")
|
91
|
+
})
|
92
|
+
return _obj
|
93
|
+
|
94
|
+
|
@@ -0,0 +1,88 @@
|
|
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, Optional
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class StartServiceRequest(BaseModel):
|
27
|
+
"""
|
28
|
+
StartServiceRequest
|
29
|
+
""" # noqa: E501
|
30
|
+
graph_id: Optional[StrictStr] = None
|
31
|
+
__properties: ClassVar[List[str]] = ["graph_id"]
|
32
|
+
|
33
|
+
model_config = ConfigDict(
|
34
|
+
populate_by_name=True,
|
35
|
+
validate_assignment=True,
|
36
|
+
protected_namespaces=(),
|
37
|
+
)
|
38
|
+
|
39
|
+
|
40
|
+
def to_str(self) -> str:
|
41
|
+
"""Returns the string representation of the model using alias"""
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
43
|
+
|
44
|
+
def to_json(self) -> str:
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
47
|
+
return json.dumps(self.to_dict())
|
48
|
+
|
49
|
+
@classmethod
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
51
|
+
"""Create an instance of StartServiceRequest from a JSON string"""
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
53
|
+
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
56
|
+
|
57
|
+
This has the following differences from calling pydantic's
|
58
|
+
`self.model_dump(by_alias=True)`:
|
59
|
+
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
61
|
+
were set at model initialization. Other fields with value `None`
|
62
|
+
are ignored.
|
63
|
+
"""
|
64
|
+
excluded_fields: Set[str] = set([
|
65
|
+
])
|
66
|
+
|
67
|
+
_dict = self.model_dump(
|
68
|
+
by_alias=True,
|
69
|
+
exclude=excluded_fields,
|
70
|
+
exclude_none=True,
|
71
|
+
)
|
72
|
+
return _dict
|
73
|
+
|
74
|
+
@classmethod
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
76
|
+
"""Create an instance of StartServiceRequest from a dict"""
|
77
|
+
if obj is None:
|
78
|
+
return None
|
79
|
+
|
80
|
+
if not isinstance(obj, dict):
|
81
|
+
return cls.model_validate(obj)
|
82
|
+
|
83
|
+
_obj = cls.model_validate({
|
84
|
+
"graph_id": obj.get("graph_id")
|
85
|
+
})
|
86
|
+
return _obj
|
87
|
+
|
88
|
+
|