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,107 @@
|
|
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 typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class JobStatus(BaseModel):
|
27
|
+
"""
|
28
|
+
JobStatus
|
29
|
+
""" # noqa: E501
|
30
|
+
id: StrictStr
|
31
|
+
type: StrictStr
|
32
|
+
status: StrictStr
|
33
|
+
start_time: Optional[StrictStr] = None
|
34
|
+
end_time: Optional[StrictStr] = None
|
35
|
+
log: Optional[StrictStr] = Field(default=None, description="logview URL or log string")
|
36
|
+
detail: Optional[Dict[str, Any]] = None
|
37
|
+
__properties: ClassVar[List[str]] = ["id", "type", "status", "start_time", "end_time", "log", "detail"]
|
38
|
+
|
39
|
+
@field_validator('status')
|
40
|
+
def status_validate_enum(cls, value):
|
41
|
+
"""Validates the enum"""
|
42
|
+
if value not in set(['RUNNING', 'SUCCESS', 'FAILED', 'CANCELLED', 'WAITING']):
|
43
|
+
raise ValueError("must be one of enum values ('RUNNING', 'SUCCESS', 'FAILED', 'CANCELLED', 'WAITING')")
|
44
|
+
return value
|
45
|
+
|
46
|
+
model_config = ConfigDict(
|
47
|
+
populate_by_name=True,
|
48
|
+
validate_assignment=True,
|
49
|
+
protected_namespaces=(),
|
50
|
+
)
|
51
|
+
|
52
|
+
|
53
|
+
def to_str(self) -> str:
|
54
|
+
"""Returns the string representation of the model using alias"""
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
56
|
+
|
57
|
+
def to_json(self) -> str:
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
59
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
60
|
+
return json.dumps(self.to_dict())
|
61
|
+
|
62
|
+
@classmethod
|
63
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
64
|
+
"""Create an instance of JobStatus from a JSON string"""
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
66
|
+
|
67
|
+
def to_dict(self) -> Dict[str, Any]:
|
68
|
+
"""Return the dictionary representation of the model using alias.
|
69
|
+
|
70
|
+
This has the following differences from calling pydantic's
|
71
|
+
`self.model_dump(by_alias=True)`:
|
72
|
+
|
73
|
+
* `None` is only added to the output dict for nullable fields that
|
74
|
+
were set at model initialization. Other fields with value `None`
|
75
|
+
are ignored.
|
76
|
+
"""
|
77
|
+
excluded_fields: Set[str] = set([
|
78
|
+
])
|
79
|
+
|
80
|
+
_dict = self.model_dump(
|
81
|
+
by_alias=True,
|
82
|
+
exclude=excluded_fields,
|
83
|
+
exclude_none=True,
|
84
|
+
)
|
85
|
+
return _dict
|
86
|
+
|
87
|
+
@classmethod
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
89
|
+
"""Create an instance of JobStatus from a dict"""
|
90
|
+
if obj is None:
|
91
|
+
return None
|
92
|
+
|
93
|
+
if not isinstance(obj, dict):
|
94
|
+
return cls.model_validate(obj)
|
95
|
+
|
96
|
+
_obj = cls.model_validate({
|
97
|
+
"id": obj.get("id"),
|
98
|
+
"type": obj.get("type"),
|
99
|
+
"status": obj.get("status"),
|
100
|
+
"start_time": obj.get("start_time"),
|
101
|
+
"end_time": obj.get("end_time"),
|
102
|
+
"log": obj.get("log"),
|
103
|
+
"detail": obj.get("detail")
|
104
|
+
})
|
105
|
+
return _obj
|
106
|
+
|
107
|
+
|
@@ -0,0 +1,93 @@
|
|
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 LongText(BaseModel):
|
27
|
+
"""
|
28
|
+
LongText
|
29
|
+
""" # noqa: E501
|
30
|
+
long_text: Optional[StrictStr]
|
31
|
+
__properties: ClassVar[List[str]] = ["long_text"]
|
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 LongText 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
|
+
# set to None if long_text (nullable) is None
|
73
|
+
# and model_fields_set contains the field
|
74
|
+
if self.long_text is None and "long_text" in self.model_fields_set:
|
75
|
+
_dict['long_text'] = None
|
76
|
+
|
77
|
+
return _dict
|
78
|
+
|
79
|
+
@classmethod
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
81
|
+
"""Create an instance of LongText from a dict"""
|
82
|
+
if obj is None:
|
83
|
+
return None
|
84
|
+
|
85
|
+
if not isinstance(obj, dict):
|
86
|
+
return cls.model_validate(obj)
|
87
|
+
|
88
|
+
_obj = cls.model_validate({
|
89
|
+
"long_text": obj.get("long_text")
|
90
|
+
})
|
91
|
+
return _obj
|
92
|
+
|
93
|
+
|
@@ -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, StrictFloat, StrictInt, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Union
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class NodeStatus(BaseModel):
|
27
|
+
"""
|
28
|
+
NodeStatus
|
29
|
+
""" # noqa: E501
|
30
|
+
name: StrictStr
|
31
|
+
cpu_usage: Union[StrictFloat, StrictInt]
|
32
|
+
memory_usage: Union[StrictFloat, StrictInt]
|
33
|
+
disk_usage: Union[StrictFloat, StrictInt]
|
34
|
+
__properties: ClassVar[List[str]] = ["name", "cpu_usage", "memory_usage", "disk_usage"]
|
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 NodeStatus 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 NodeStatus 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
|
+
"name": obj.get("name"),
|
88
|
+
"cpu_usage": obj.get("cpu_usage"),
|
89
|
+
"memory_usage": obj.get("memory_usage"),
|
90
|
+
"disk_usage": obj.get("disk_usage")
|
91
|
+
})
|
92
|
+
return _obj
|
93
|
+
|
94
|
+
|
@@ -0,0 +1,96 @@
|
|
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, StrictBool, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from graphscope.flex.rest.models.gs_data_type import GSDataType
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class Parameter(BaseModel):
|
28
|
+
"""
|
29
|
+
Parameter
|
30
|
+
""" # noqa: E501
|
31
|
+
name: StrictStr
|
32
|
+
type: GSDataType
|
33
|
+
allow_cast: Optional[StrictBool] = None
|
34
|
+
__properties: ClassVar[List[str]] = ["name", "type", "allow_cast"]
|
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 Parameter 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 type
|
76
|
+
if self.type:
|
77
|
+
_dict['type'] = self.type.to_dict()
|
78
|
+
return _dict
|
79
|
+
|
80
|
+
@classmethod
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
82
|
+
"""Create an instance of Parameter from a dict"""
|
83
|
+
if obj is None:
|
84
|
+
return None
|
85
|
+
|
86
|
+
if not isinstance(obj, dict):
|
87
|
+
return cls.model_validate(obj)
|
88
|
+
|
89
|
+
_obj = cls.model_validate({
|
90
|
+
"name": obj.get("name"),
|
91
|
+
"type": GSDataType.from_dict(obj["type"]) if obj.get("type") is not None else None,
|
92
|
+
"allow_cast": obj.get("allow_cast")
|
93
|
+
})
|
94
|
+
return _obj
|
95
|
+
|
96
|
+
|
@@ -0,0 +1,108 @@
|
|
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, StrictInt, 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 PodStatus(BaseModel):
|
27
|
+
"""
|
28
|
+
PodStatus
|
29
|
+
""" # noqa: E501
|
30
|
+
name: StrictStr
|
31
|
+
image: List[StrictStr]
|
32
|
+
labels: Dict[str, Any]
|
33
|
+
node: StrictStr
|
34
|
+
status: StrictStr
|
35
|
+
restart_count: StrictInt
|
36
|
+
cpu_usage: StrictInt
|
37
|
+
memory_usage: StrictInt
|
38
|
+
timestamp: Optional[StrictStr] = None
|
39
|
+
creation_time: StrictStr
|
40
|
+
component_belong_to: Optional[StrictStr] = None
|
41
|
+
__properties: ClassVar[List[str]] = ["name", "image", "labels", "node", "status", "restart_count", "cpu_usage", "memory_usage", "timestamp", "creation_time", "component_belong_to"]
|
42
|
+
|
43
|
+
model_config = ConfigDict(
|
44
|
+
populate_by_name=True,
|
45
|
+
validate_assignment=True,
|
46
|
+
protected_namespaces=(),
|
47
|
+
)
|
48
|
+
|
49
|
+
|
50
|
+
def to_str(self) -> str:
|
51
|
+
"""Returns the string representation of the model using alias"""
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
53
|
+
|
54
|
+
def to_json(self) -> str:
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
61
|
+
"""Create an instance of PodStatus from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
66
|
+
|
67
|
+
This has the following differences from calling pydantic's
|
68
|
+
`self.model_dump(by_alias=True)`:
|
69
|
+
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
71
|
+
were set at model initialization. Other fields with value `None`
|
72
|
+
are ignored.
|
73
|
+
"""
|
74
|
+
excluded_fields: Set[str] = set([
|
75
|
+
])
|
76
|
+
|
77
|
+
_dict = self.model_dump(
|
78
|
+
by_alias=True,
|
79
|
+
exclude=excluded_fields,
|
80
|
+
exclude_none=True,
|
81
|
+
)
|
82
|
+
return _dict
|
83
|
+
|
84
|
+
@classmethod
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
86
|
+
"""Create an instance of PodStatus from a dict"""
|
87
|
+
if obj is None:
|
88
|
+
return None
|
89
|
+
|
90
|
+
if not isinstance(obj, dict):
|
91
|
+
return cls.model_validate(obj)
|
92
|
+
|
93
|
+
_obj = cls.model_validate({
|
94
|
+
"name": obj.get("name"),
|
95
|
+
"image": obj.get("image"),
|
96
|
+
"labels": obj.get("labels"),
|
97
|
+
"node": obj.get("node"),
|
98
|
+
"status": obj.get("status"),
|
99
|
+
"restart_count": obj.get("restart_count"),
|
100
|
+
"cpu_usage": obj.get("cpu_usage"),
|
101
|
+
"memory_usage": obj.get("memory_usage"),
|
102
|
+
"timestamp": obj.get("timestamp"),
|
103
|
+
"creation_time": obj.get("creation_time"),
|
104
|
+
"component_belong_to": obj.get("component_belong_to")
|
105
|
+
})
|
106
|
+
return _obj
|
107
|
+
|
108
|
+
|
@@ -0,0 +1,95 @@
|
|
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 PrimitiveType(BaseModel):
|
27
|
+
"""
|
28
|
+
PrimitiveType
|
29
|
+
""" # noqa: E501
|
30
|
+
primitive_type: StrictStr
|
31
|
+
__properties: ClassVar[List[str]] = ["primitive_type"]
|
32
|
+
|
33
|
+
@field_validator('primitive_type')
|
34
|
+
def primitive_type_validate_enum(cls, value):
|
35
|
+
"""Validates the enum"""
|
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')")
|
38
|
+
return value
|
39
|
+
|
40
|
+
model_config = ConfigDict(
|
41
|
+
populate_by_name=True,
|
42
|
+
validate_assignment=True,
|
43
|
+
protected_namespaces=(),
|
44
|
+
)
|
45
|
+
|
46
|
+
|
47
|
+
def to_str(self) -> str:
|
48
|
+
"""Returns the string representation of the model using alias"""
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
50
|
+
|
51
|
+
def to_json(self) -> str:
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
54
|
+
return json.dumps(self.to_dict())
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
58
|
+
"""Create an instance of PrimitiveType from a JSON string"""
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
60
|
+
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
63
|
+
|
64
|
+
This has the following differences from calling pydantic's
|
65
|
+
`self.model_dump(by_alias=True)`:
|
66
|
+
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
68
|
+
were set at model initialization. Other fields with value `None`
|
69
|
+
are ignored.
|
70
|
+
"""
|
71
|
+
excluded_fields: Set[str] = set([
|
72
|
+
])
|
73
|
+
|
74
|
+
_dict = self.model_dump(
|
75
|
+
by_alias=True,
|
76
|
+
exclude=excluded_fields,
|
77
|
+
exclude_none=True,
|
78
|
+
)
|
79
|
+
return _dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
83
|
+
"""Create an instance of PrimitiveType from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return cls.model_validate(obj)
|
89
|
+
|
90
|
+
_obj = cls.model_validate({
|
91
|
+
"primitive_type": obj.get("primitive_type")
|
92
|
+
})
|
93
|
+
return _obj
|
94
|
+
|
95
|
+
|
@@ -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
|
+
|