graphscope-flex 0.27.0__5-py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- graphscope/flex/rest/__init__.py +97 -0
- graphscope/flex/rest/api/__init__.py +12 -0
- graphscope/flex/rest/api/alert_api.py +2780 -0
- graphscope/flex/rest/api/data_source_api.py +1173 -0
- graphscope/flex/rest/api/deployment_api.py +528 -0
- graphscope/flex/rest/api/graph_api.py +2803 -0
- graphscope/flex/rest/api/job_api.py +1356 -0
- graphscope/flex/rest/api/service_api.py +1311 -0
- graphscope/flex/rest/api/stored_procedure_api.py +1449 -0
- graphscope/flex/rest/api/utils_api.py +309 -0
- graphscope/flex/rest/api_client.py +759 -0
- graphscope/flex/rest/api_response.py +21 -0
- graphscope/flex/rest/configuration.py +437 -0
- graphscope/flex/rest/exceptions.py +200 -0
- graphscope/flex/rest/models/__init__.py +73 -0
- graphscope/flex/rest/models/base_edge_type.py +102 -0
- graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner.py +105 -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 +100 -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/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 +126 -0
- graphscope/flex/rest/models/get_graph_schema_response.py +106 -0
- graphscope/flex/rest/models/get_property_meta.py +102 -0
- graphscope/flex/rest/models/get_stored_proc_response.py +128 -0
- graphscope/flex/rest/models/get_vertex_type.py +110 -0
- graphscope/flex/rest/models/gs_data_type.py +138 -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 +94 -0
- graphscope/flex/rest/models/primitive_type.py +95 -0
- graphscope/flex/rest/models/running_deployment_info.py +128 -0
- graphscope/flex/rest/models/running_deployment_status.py +105 -0
- graphscope/flex/rest/models/running_deployment_status_nodes_inner.py +124 -0
- graphscope/flex/rest/models/schema_mapping.py +106 -0
- graphscope/flex/rest/models/service_status.py +105 -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 +124 -0
- graphscope/flex/rest/models/string_type.py +92 -0
- graphscope/flex/rest/models/string_type_string.py +124 -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 +256 -0
- graphscope_flex-0.27.0.dist-info/METADATA +17 -0
- graphscope_flex-0.27.0.dist-info/RECORD +77 -0
- graphscope_flex-0.27.0.dist-info/WHEEL +6 -0
- graphscope_flex-0.27.0.dist-info/top_level.txt +1 -0
@@ -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/). 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, 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 = {
|
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
|
+
|
@@ -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/). 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, Optional
|
23
|
+
from graphscope.flex.rest.models.parameter import Parameter
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class StoredProcedureMeta(BaseModel):
|
28
|
+
"""
|
29
|
+
StoredProcedureMeta
|
30
|
+
""" # noqa: E501
|
31
|
+
name: StrictStr
|
32
|
+
description: Optional[StrictStr] = None
|
33
|
+
type: StrictStr
|
34
|
+
query: StrictStr
|
35
|
+
id: StrictStr
|
36
|
+
library: StrictStr
|
37
|
+
params: List[Parameter]
|
38
|
+
returns: List[Parameter]
|
39
|
+
__properties: ClassVar[List[str]] = ["name", "description", "type", "query", "id", "library", "params", "returns"]
|
40
|
+
|
41
|
+
@field_validator('type')
|
42
|
+
def type_validate_enum(cls, value):
|
43
|
+
"""Validates the enum"""
|
44
|
+
if value not in set(['cpp', 'cypher']):
|
45
|
+
raise ValueError("must be one of enum values ('cpp', 'cypher')")
|
46
|
+
return value
|
47
|
+
|
48
|
+
model_config = {
|
49
|
+
"populate_by_name": True,
|
50
|
+
"validate_assignment": True,
|
51
|
+
"protected_namespaces": (),
|
52
|
+
}
|
53
|
+
|
54
|
+
|
55
|
+
def to_str(self) -> str:
|
56
|
+
"""Returns the string representation of the model using alias"""
|
57
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
58
|
+
|
59
|
+
def to_json(self) -> str:
|
60
|
+
"""Returns the JSON representation of the model using alias"""
|
61
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
62
|
+
return json.dumps(self.to_dict())
|
63
|
+
|
64
|
+
@classmethod
|
65
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
66
|
+
"""Create an instance of StoredProcedureMeta from a JSON string"""
|
67
|
+
return cls.from_dict(json.loads(json_str))
|
68
|
+
|
69
|
+
def to_dict(self) -> Dict[str, Any]:
|
70
|
+
"""Return the dictionary representation of the model using alias.
|
71
|
+
|
72
|
+
This has the following differences from calling pydantic's
|
73
|
+
`self.model_dump(by_alias=True)`:
|
74
|
+
|
75
|
+
* `None` is only added to the output dict for nullable fields that
|
76
|
+
were set at model initialization. Other fields with value `None`
|
77
|
+
are ignored.
|
78
|
+
"""
|
79
|
+
excluded_fields: Set[str] = set([
|
80
|
+
])
|
81
|
+
|
82
|
+
_dict = self.model_dump(
|
83
|
+
by_alias=True,
|
84
|
+
exclude=excluded_fields,
|
85
|
+
exclude_none=True,
|
86
|
+
)
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of each item in params (list)
|
88
|
+
_items = []
|
89
|
+
if self.params:
|
90
|
+
for _item in self.params:
|
91
|
+
if _item:
|
92
|
+
_items.append(_item.to_dict())
|
93
|
+
_dict['params'] = _items
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of each item in returns (list)
|
95
|
+
_items = []
|
96
|
+
if self.returns:
|
97
|
+
for _item in self.returns:
|
98
|
+
if _item:
|
99
|
+
_items.append(_item.to_dict())
|
100
|
+
_dict['returns'] = _items
|
101
|
+
return _dict
|
102
|
+
|
103
|
+
@classmethod
|
104
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
105
|
+
"""Create an instance of StoredProcedureMeta from a dict"""
|
106
|
+
if obj is None:
|
107
|
+
return None
|
108
|
+
|
109
|
+
if not isinstance(obj, dict):
|
110
|
+
return cls.model_validate(obj)
|
111
|
+
|
112
|
+
_obj = cls.model_validate({
|
113
|
+
"name": obj.get("name"),
|
114
|
+
"description": obj.get("description"),
|
115
|
+
"type": obj.get("type"),
|
116
|
+
"query": obj.get("query"),
|
117
|
+
"id": obj.get("id"),
|
118
|
+
"library": obj.get("library"),
|
119
|
+
"params": [Parameter.from_dict(_item) for _item in obj["params"]] if obj.get("params") is not None else None,
|
120
|
+
"returns": [Parameter.from_dict(_item) for _item in obj["returns"]] if obj.get("returns") is not None else None
|
121
|
+
})
|
122
|
+
return _obj
|
123
|
+
|
124
|
+
|
@@ -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/). 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.string_type_string import StringTypeString
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class StringType(BaseModel):
|
28
|
+
"""
|
29
|
+
StringType
|
30
|
+
""" # noqa: E501
|
31
|
+
string: StringTypeString
|
32
|
+
__properties: ClassVar[List[str]] = ["string"]
|
33
|
+
|
34
|
+
model_config = {
|
35
|
+
"populate_by_name": True,
|
36
|
+
"validate_assignment": True,
|
37
|
+
"protected_namespaces": (),
|
38
|
+
}
|
39
|
+
|
40
|
+
|
41
|
+
def to_str(self) -> str:
|
42
|
+
"""Returns the string representation of the model using alias"""
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
44
|
+
|
45
|
+
def to_json(self) -> str:
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
+
"""Create an instance of StringType from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
57
|
+
|
58
|
+
This has the following differences from calling pydantic's
|
59
|
+
`self.model_dump(by_alias=True)`:
|
60
|
+
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
62
|
+
were set at model initialization. Other fields with value `None`
|
63
|
+
are ignored.
|
64
|
+
"""
|
65
|
+
excluded_fields: Set[str] = set([
|
66
|
+
])
|
67
|
+
|
68
|
+
_dict = self.model_dump(
|
69
|
+
by_alias=True,
|
70
|
+
exclude=excluded_fields,
|
71
|
+
exclude_none=True,
|
72
|
+
)
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of string
|
74
|
+
if self.string:
|
75
|
+
_dict['string'] = self.string.to_dict()
|
76
|
+
return _dict
|
77
|
+
|
78
|
+
@classmethod
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
80
|
+
"""Create an instance of StringType from a dict"""
|
81
|
+
if obj is None:
|
82
|
+
return None
|
83
|
+
|
84
|
+
if not isinstance(obj, dict):
|
85
|
+
return cls.model_validate(obj)
|
86
|
+
|
87
|
+
_obj = cls.model_validate({
|
88
|
+
"string": StringTypeString.from_dict(obj["string"]) if obj.get("string") is not None else None
|
89
|
+
})
|
90
|
+
return _obj
|
91
|
+
|
92
|
+
|
@@ -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/). 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.long_text import LongText
|
22
|
+
from pydantic import StrictStr, Field
|
23
|
+
from typing import Union, List, Optional, Dict
|
24
|
+
from typing_extensions import Literal, Self
|
25
|
+
|
26
|
+
STRINGTYPESTRING_ONE_OF_SCHEMAS = ["LongText"]
|
27
|
+
|
28
|
+
class StringTypeString(BaseModel):
|
29
|
+
"""
|
30
|
+
StringTypeString
|
31
|
+
"""
|
32
|
+
# data type: LongText
|
33
|
+
oneof_schema_1_validator: Optional[LongText] = None
|
34
|
+
actual_instance: Optional[Union[LongText]] = None
|
35
|
+
one_of_schemas: List[str] = Field(default=Literal["LongText"])
|
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 = StringTypeString.model_construct()
|
56
|
+
error_messages = []
|
57
|
+
match = 0
|
58
|
+
# validate data type: LongText
|
59
|
+
if not isinstance(v, LongText):
|
60
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `LongText`")
|
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 StringTypeString with oneOf schemas: LongText. Details: " + ", ".join(error_messages))
|
66
|
+
elif match == 0:
|
67
|
+
# no match
|
68
|
+
raise ValueError("No match found when setting `actual_instance` in StringTypeString with oneOf schemas: LongText. 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 LongText
|
84
|
+
try:
|
85
|
+
instance.actual_instance = LongText.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 StringTypeString with oneOf schemas: LongText. Details: " + ", ".join(error_messages))
|
93
|
+
elif match == 0:
|
94
|
+
# no match
|
95
|
+
raise ValueError("No match found when deserializing the JSON string into StringTypeString with oneOf schemas: LongText. 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], LongText]]:
|
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
|
+
|
@@ -0,0 +1,97 @@
|
|
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 UpdateAlertMessageStatusRequest(BaseModel):
|
27
|
+
"""
|
28
|
+
UpdateAlertMessageStatusRequest
|
29
|
+
""" # noqa: E501
|
30
|
+
message_ids: List[StrictStr]
|
31
|
+
status: StrictStr
|
32
|
+
__properties: ClassVar[List[str]] = ["message_ids", "status"]
|
33
|
+
|
34
|
+
@field_validator('status')
|
35
|
+
def status_validate_enum(cls, value):
|
36
|
+
"""Validates the enum"""
|
37
|
+
if value not in set(['unsolved', 'solved', 'dealing']):
|
38
|
+
raise ValueError("must be one of enum values ('unsolved', 'solved', 'dealing')")
|
39
|
+
return value
|
40
|
+
|
41
|
+
model_config = {
|
42
|
+
"populate_by_name": True,
|
43
|
+
"validate_assignment": True,
|
44
|
+
"protected_namespaces": (),
|
45
|
+
}
|
46
|
+
|
47
|
+
|
48
|
+
def to_str(self) -> str:
|
49
|
+
"""Returns the string representation of the model using alias"""
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
51
|
+
|
52
|
+
def to_json(self) -> str:
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
55
|
+
return json.dumps(self.to_dict())
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
59
|
+
"""Create an instance of UpdateAlertMessageStatusRequest from a JSON string"""
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
61
|
+
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
64
|
+
|
65
|
+
This has the following differences from calling pydantic's
|
66
|
+
`self.model_dump(by_alias=True)`:
|
67
|
+
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
69
|
+
were set at model initialization. Other fields with value `None`
|
70
|
+
are ignored.
|
71
|
+
"""
|
72
|
+
excluded_fields: Set[str] = set([
|
73
|
+
])
|
74
|
+
|
75
|
+
_dict = self.model_dump(
|
76
|
+
by_alias=True,
|
77
|
+
exclude=excluded_fields,
|
78
|
+
exclude_none=True,
|
79
|
+
)
|
80
|
+
return _dict
|
81
|
+
|
82
|
+
@classmethod
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
84
|
+
"""Create an instance of UpdateAlertMessageStatusRequest from a dict"""
|
85
|
+
if obj is None:
|
86
|
+
return None
|
87
|
+
|
88
|
+
if not isinstance(obj, dict):
|
89
|
+
return cls.model_validate(obj)
|
90
|
+
|
91
|
+
_obj = cls.model_validate({
|
92
|
+
"message_ids": obj.get("message_ids"),
|
93
|
+
"status": obj.get("status")
|
94
|
+
})
|
95
|
+
return _obj
|
96
|
+
|
97
|
+
|
@@ -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/). 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 typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class UpdateStoredProcRequest(BaseModel):
|
27
|
+
"""
|
28
|
+
UpdateStoredProcRequest
|
29
|
+
""" # noqa: E501
|
30
|
+
description: StrictStr
|
31
|
+
__properties: ClassVar[List[str]] = ["description"]
|
32
|
+
|
33
|
+
model_config = {
|
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 UpdateStoredProcRequest 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 UpdateStoredProcRequest 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
|
+
"description": obj.get("description")
|
85
|
+
})
|
86
|
+
return _obj
|
87
|
+
|
88
|
+
|