graphscope-flex 0.27.0__3-py2.py3-none-any.whl → 0.28.0__3-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-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/METADATA +6 -4
- graphscope_flex-0.28.0.dist-info/RECORD +11 -0
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/WHEEL +1 -1
- graphscope/flex/rest/api/__init__.py +0 -12
- graphscope/flex/rest/api/alert_api.py +0 -2780
- graphscope/flex/rest/api/data_source_api.py +0 -1173
- graphscope/flex/rest/api/deployment_api.py +0 -528
- graphscope/flex/rest/api/graph_api.py +0 -2803
- graphscope/flex/rest/api/job_api.py +0 -1356
- graphscope/flex/rest/api/service_api.py +0 -1311
- graphscope/flex/rest/api/stored_procedure_api.py +0 -1449
- graphscope/flex/rest/api/utils_api.py +0 -309
- graphscope/flex/rest/models/__init__.py +0 -73
- graphscope/flex/rest/models/base_edge_type.py +0 -102
- graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner.py +0 -105
- graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner_x_csr_params.py +0 -98
- graphscope/flex/rest/models/base_property_meta.py +0 -105
- graphscope/flex/rest/models/base_vertex_type.py +0 -96
- graphscope/flex/rest/models/base_vertex_type_x_csr_params.py +0 -88
- graphscope/flex/rest/models/column_mapping.py +0 -94
- graphscope/flex/rest/models/column_mapping_column.py +0 -90
- graphscope/flex/rest/models/create_alert_receiver_request.py +0 -103
- graphscope/flex/rest/models/create_alert_rule_request.py +0 -112
- graphscope/flex/rest/models/create_dataloading_job_response.py +0 -88
- graphscope/flex/rest/models/create_edge_type.py +0 -114
- graphscope/flex/rest/models/create_graph_request.py +0 -106
- graphscope/flex/rest/models/create_graph_response.py +0 -88
- graphscope/flex/rest/models/create_graph_schema_request.py +0 -106
- graphscope/flex/rest/models/create_property_meta.py +0 -100
- graphscope/flex/rest/models/create_stored_proc_request.py +0 -101
- graphscope/flex/rest/models/create_stored_proc_response.py +0 -88
- graphscope/flex/rest/models/create_vertex_type.py +0 -108
- graphscope/flex/rest/models/dataloading_job_config.py +0 -136
- graphscope/flex/rest/models/dataloading_job_config_edges_inner.py +0 -92
- graphscope/flex/rest/models/dataloading_job_config_loading_config.py +0 -104
- graphscope/flex/rest/models/dataloading_job_config_loading_config_format.py +0 -90
- graphscope/flex/rest/models/dataloading_job_config_vertices_inner.py +0 -88
- graphscope/flex/rest/models/edge_mapping.py +0 -122
- graphscope/flex/rest/models/edge_mapping_type_triplet.py +0 -92
- graphscope/flex/rest/models/error.py +0 -90
- graphscope/flex/rest/models/get_alert_message_response.py +0 -123
- graphscope/flex/rest/models/get_alert_receiver_response.py +0 -107
- graphscope/flex/rest/models/get_alert_rule_response.py +0 -114
- graphscope/flex/rest/models/get_edge_type.py +0 -116
- graphscope/flex/rest/models/get_graph_response.py +0 -126
- graphscope/flex/rest/models/get_graph_schema_response.py +0 -106
- graphscope/flex/rest/models/get_property_meta.py +0 -102
- graphscope/flex/rest/models/get_stored_proc_response.py +0 -128
- graphscope/flex/rest/models/get_vertex_type.py +0 -110
- graphscope/flex/rest/models/gs_data_type.py +0 -138
- graphscope/flex/rest/models/job_status.py +0 -107
- graphscope/flex/rest/models/long_text.py +0 -93
- graphscope/flex/rest/models/node_status.py +0 -94
- graphscope/flex/rest/models/parameter.py +0 -94
- graphscope/flex/rest/models/primitive_type.py +0 -95
- graphscope/flex/rest/models/running_deployment_info.py +0 -128
- graphscope/flex/rest/models/running_deployment_status.py +0 -105
- graphscope/flex/rest/models/running_deployment_status_nodes_inner.py +0 -124
- graphscope/flex/rest/models/schema_mapping.py +0 -106
- graphscope/flex/rest/models/service_status.py +0 -105
- graphscope/flex/rest/models/service_status_sdk_endpoints.py +0 -94
- graphscope/flex/rest/models/start_service_request.py +0 -88
- graphscope/flex/rest/models/stored_procedure_meta.py +0 -124
- graphscope/flex/rest/models/string_type.py +0 -92
- graphscope/flex/rest/models/string_type_string.py +0 -124
- graphscope/flex/rest/models/update_alert_message_status_request.py +0 -97
- graphscope/flex/rest/models/update_stored_proc_request.py +0 -88
- graphscope/flex/rest/models/upload_file_response.py +0 -88
- graphscope/flex/rest/models/vertex_mapping.py +0 -100
- graphscope_flex-0.27.0.dist-info/RECORD +0 -77
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/top_level.txt +0 -0
@@ -1,94 +0,0 @@
|
|
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/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
|
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, StrictStr
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
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
|
-
__properties: ClassVar[List[str]] = ["name", "type"]
|
34
|
-
|
35
|
-
model_config = {
|
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 Parameter from a JSON string"""
|
54
|
-
return cls.from_dict(json.loads(json_str))
|
55
|
-
|
56
|
-
def to_dict(self) -> Dict[str, Any]:
|
57
|
-
"""Return the dictionary representation of the model using alias.
|
58
|
-
|
59
|
-
This has the following differences from calling pydantic's
|
60
|
-
`self.model_dump(by_alias=True)`:
|
61
|
-
|
62
|
-
* `None` is only added to the output dict for nullable fields that
|
63
|
-
were set at model initialization. Other fields with value `None`
|
64
|
-
are ignored.
|
65
|
-
"""
|
66
|
-
excluded_fields: Set[str] = set([
|
67
|
-
])
|
68
|
-
|
69
|
-
_dict = self.model_dump(
|
70
|
-
by_alias=True,
|
71
|
-
exclude=excluded_fields,
|
72
|
-
exclude_none=True,
|
73
|
-
)
|
74
|
-
# override the default output from pydantic by calling `to_dict()` of type
|
75
|
-
if self.type:
|
76
|
-
_dict['type'] = self.type.to_dict()
|
77
|
-
return _dict
|
78
|
-
|
79
|
-
@classmethod
|
80
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
81
|
-
"""Create an instance of Parameter 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
|
-
"name": obj.get("name"),
|
90
|
-
"type": GSDataType.from_dict(obj["type"]) if obj.get("type") is not None else None
|
91
|
-
})
|
92
|
-
return _obj
|
93
|
-
|
94
|
-
|
@@ -1,95 +0,0 @@
|
|
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/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
|
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, 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 = {
|
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
|
-
|
@@ -1,128 +0,0 @@
|
|
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/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
|
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, 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']):
|
64
|
-
raise ValueError("must be one of enum values ('MutableCSR')")
|
65
|
-
return value
|
66
|
-
|
67
|
-
model_config = {
|
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
|
-
|
@@ -1,105 +0,0 @@
|
|
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/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
|
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, StrictStr, field_validator
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
23
|
-
from graphscope.flex.rest.models.running_deployment_status_nodes_inner import RunningDeploymentStatusNodesInner
|
24
|
-
from typing import Optional, Set
|
25
|
-
from typing_extensions import Self
|
26
|
-
|
27
|
-
class RunningDeploymentStatus(BaseModel):
|
28
|
-
"""
|
29
|
-
RunningDeploymentStatus
|
30
|
-
""" # noqa: E501
|
31
|
-
cluster_type: StrictStr
|
32
|
-
nodes: List[RunningDeploymentStatusNodesInner]
|
33
|
-
__properties: ClassVar[List[str]] = ["cluster_type", "nodes"]
|
34
|
-
|
35
|
-
@field_validator('cluster_type')
|
36
|
-
def cluster_type_validate_enum(cls, value):
|
37
|
-
"""Validates the enum"""
|
38
|
-
if value not in set(['HOSTS', 'KUBERNETES']):
|
39
|
-
raise ValueError("must be one of enum values ('HOSTS', 'KUBERNETES')")
|
40
|
-
return value
|
41
|
-
|
42
|
-
model_config = {
|
43
|
-
"populate_by_name": True,
|
44
|
-
"validate_assignment": True,
|
45
|
-
"protected_namespaces": (),
|
46
|
-
}
|
47
|
-
|
48
|
-
|
49
|
-
def to_str(self) -> str:
|
50
|
-
"""Returns the string representation of the model using alias"""
|
51
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
52
|
-
|
53
|
-
def to_json(self) -> str:
|
54
|
-
"""Returns the JSON representation of the model using alias"""
|
55
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
56
|
-
return json.dumps(self.to_dict())
|
57
|
-
|
58
|
-
@classmethod
|
59
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
60
|
-
"""Create an instance of RunningDeploymentStatus from a JSON string"""
|
61
|
-
return cls.from_dict(json.loads(json_str))
|
62
|
-
|
63
|
-
def to_dict(self) -> Dict[str, Any]:
|
64
|
-
"""Return the dictionary representation of the model using alias.
|
65
|
-
|
66
|
-
This has the following differences from calling pydantic's
|
67
|
-
`self.model_dump(by_alias=True)`:
|
68
|
-
|
69
|
-
* `None` is only added to the output dict for nullable fields that
|
70
|
-
were set at model initialization. Other fields with value `None`
|
71
|
-
are ignored.
|
72
|
-
"""
|
73
|
-
excluded_fields: Set[str] = set([
|
74
|
-
])
|
75
|
-
|
76
|
-
_dict = self.model_dump(
|
77
|
-
by_alias=True,
|
78
|
-
exclude=excluded_fields,
|
79
|
-
exclude_none=True,
|
80
|
-
)
|
81
|
-
# override the default output from pydantic by calling `to_dict()` of each item in nodes (list)
|
82
|
-
_items = []
|
83
|
-
if self.nodes:
|
84
|
-
for _item in self.nodes:
|
85
|
-
if _item:
|
86
|
-
_items.append(_item.to_dict())
|
87
|
-
_dict['nodes'] = _items
|
88
|
-
return _dict
|
89
|
-
|
90
|
-
@classmethod
|
91
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
92
|
-
"""Create an instance of RunningDeploymentStatus from a dict"""
|
93
|
-
if obj is None:
|
94
|
-
return None
|
95
|
-
|
96
|
-
if not isinstance(obj, dict):
|
97
|
-
return cls.model_validate(obj)
|
98
|
-
|
99
|
-
_obj = cls.model_validate({
|
100
|
-
"cluster_type": obj.get("cluster_type"),
|
101
|
-
"nodes": [RunningDeploymentStatusNodesInner.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None
|
102
|
-
})
|
103
|
-
return _obj
|
104
|
-
|
105
|
-
|
@@ -1,124 +0,0 @@
|
|
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/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
|
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 json
|
18
|
-
import pprint
|
19
|
-
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
|
20
|
-
from typing import Any, List, Optional
|
21
|
-
from graphscope.flex.rest.models.node_status import NodeStatus
|
22
|
-
from pydantic import StrictStr, Field
|
23
|
-
from typing import Union, List, Optional, Dict
|
24
|
-
from typing_extensions import Literal, Self
|
25
|
-
|
26
|
-
RUNNINGDEPLOYMENTSTATUSNODESINNER_ONE_OF_SCHEMAS = ["NodeStatus"]
|
27
|
-
|
28
|
-
class RunningDeploymentStatusNodesInner(BaseModel):
|
29
|
-
"""
|
30
|
-
RunningDeploymentStatusNodesInner
|
31
|
-
"""
|
32
|
-
# data type: NodeStatus
|
33
|
-
oneof_schema_1_validator: Optional[NodeStatus] = None
|
34
|
-
actual_instance: Optional[Union[NodeStatus]] = None
|
35
|
-
one_of_schemas: List[str] = Field(default=Literal["NodeStatus"])
|
36
|
-
|
37
|
-
model_config = {
|
38
|
-
"validate_assignment": True,
|
39
|
-
"protected_namespaces": (),
|
40
|
-
}
|
41
|
-
|
42
|
-
|
43
|
-
def __init__(self, *args, **kwargs) -> None:
|
44
|
-
if args:
|
45
|
-
if len(args) > 1:
|
46
|
-
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
47
|
-
if kwargs:
|
48
|
-
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
49
|
-
super().__init__(actual_instance=args[0])
|
50
|
-
else:
|
51
|
-
super().__init__(**kwargs)
|
52
|
-
|
53
|
-
@field_validator('actual_instance')
|
54
|
-
def actual_instance_must_validate_oneof(cls, v):
|
55
|
-
instance = RunningDeploymentStatusNodesInner.model_construct()
|
56
|
-
error_messages = []
|
57
|
-
match = 0
|
58
|
-
# validate data type: NodeStatus
|
59
|
-
if not isinstance(v, NodeStatus):
|
60
|
-
error_messages.append(f"Error! Input type `{type(v)}` is not `NodeStatus`")
|
61
|
-
else:
|
62
|
-
match += 1
|
63
|
-
if match > 1:
|
64
|
-
# more than 1 match
|
65
|
-
raise ValueError("Multiple matches found when setting `actual_instance` in RunningDeploymentStatusNodesInner with oneOf schemas: NodeStatus. Details: " + ", ".join(error_messages))
|
66
|
-
elif match == 0:
|
67
|
-
# no match
|
68
|
-
raise ValueError("No match found when setting `actual_instance` in RunningDeploymentStatusNodesInner with oneOf schemas: NodeStatus. Details: " + ", ".join(error_messages))
|
69
|
-
else:
|
70
|
-
return v
|
71
|
-
|
72
|
-
@classmethod
|
73
|
-
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
74
|
-
return cls.from_json(json.dumps(obj))
|
75
|
-
|
76
|
-
@classmethod
|
77
|
-
def from_json(cls, json_str: str) -> Self:
|
78
|
-
"""Returns the object represented by the json string"""
|
79
|
-
instance = cls.model_construct()
|
80
|
-
error_messages = []
|
81
|
-
match = 0
|
82
|
-
|
83
|
-
# deserialize data into NodeStatus
|
84
|
-
try:
|
85
|
-
instance.actual_instance = NodeStatus.from_json(json_str)
|
86
|
-
match += 1
|
87
|
-
except (ValidationError, ValueError) as e:
|
88
|
-
error_messages.append(str(e))
|
89
|
-
|
90
|
-
if match > 1:
|
91
|
-
# more than 1 match
|
92
|
-
raise ValueError("Multiple matches found when deserializing the JSON string into RunningDeploymentStatusNodesInner with oneOf schemas: NodeStatus. Details: " + ", ".join(error_messages))
|
93
|
-
elif match == 0:
|
94
|
-
# no match
|
95
|
-
raise ValueError("No match found when deserializing the JSON string into RunningDeploymentStatusNodesInner with oneOf schemas: NodeStatus. Details: " + ", ".join(error_messages))
|
96
|
-
else:
|
97
|
-
return instance
|
98
|
-
|
99
|
-
def to_json(self) -> str:
|
100
|
-
"""Returns the JSON representation of the actual instance"""
|
101
|
-
if self.actual_instance is None:
|
102
|
-
return "null"
|
103
|
-
|
104
|
-
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
105
|
-
return self.actual_instance.to_json()
|
106
|
-
else:
|
107
|
-
return json.dumps(self.actual_instance)
|
108
|
-
|
109
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], NodeStatus]]:
|
110
|
-
"""Returns the dict representation of the actual instance"""
|
111
|
-
if self.actual_instance is None:
|
112
|
-
return None
|
113
|
-
|
114
|
-
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
115
|
-
return self.actual_instance.to_dict()
|
116
|
-
else:
|
117
|
-
# primitive type
|
118
|
-
return self.actual_instance
|
119
|
-
|
120
|
-
def to_str(self) -> str:
|
121
|
-
"""Returns the string representation of the actual instance"""
|
122
|
-
return pprint.pformat(self.model_dump())
|
123
|
-
|
124
|
-
|
@@ -1,106 +0,0 @@
|
|
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/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
|
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
|
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 = {
|
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 in self.vertex_mappings:
|
79
|
-
if _item:
|
80
|
-
_items.append(_item.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 in self.edge_mappings:
|
86
|
-
if _item:
|
87
|
-
_items.append(_item.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
|
-
|