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