graphscope-flex 0.27.0__py2.py3-none-any.whl → 0.29.0a20241008__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 (96) hide show
  1. graphscope/flex/rest/__init__.py +59 -44
  2. graphscope/flex/rest/api/__init__.py +2 -4
  3. graphscope/flex/rest/api/alert_api.py +721 -394
  4. graphscope/flex/rest/api/{legacy_api.py → data_source_api.py} +260 -189
  5. graphscope/flex/rest/api/deployment_api.py +388 -138
  6. graphscope/flex/rest/api/graph_api.py +858 -260
  7. graphscope/flex/rest/api/job_api.py +286 -203
  8. graphscope/flex/rest/api/service_api.py +320 -39
  9. graphscope/flex/rest/api/{procedure_api.py → stored_procedure_api.py} +296 -237
  10. graphscope/flex/rest/api/utils_api.py +18 -13
  11. graphscope/flex/rest/api_client.py +60 -30
  12. graphscope/flex/rest/configuration.py +19 -5
  13. graphscope/flex/rest/exceptions.py +2 -2
  14. graphscope/flex/rest/models/__init__.py +57 -40
  15. graphscope/flex/rest/models/{vertex_type.py → base_edge_type.py} +25 -25
  16. graphscope/flex/rest/models/{edge_type_vertex_type_pair_relations_inner.py → base_edge_type_vertex_type_pair_relations_inner.py} +17 -17
  17. graphscope/flex/rest/models/{edge_type_vertex_type_pair_relations_inner_x_csr_params.py → base_edge_type_vertex_type_pair_relations_inner_x_csr_params.py} +11 -11
  18. graphscope/flex/rest/models/{model_property.py → base_property_meta.py} +28 -19
  19. graphscope/flex/rest/models/base_vertex_type.py +96 -0
  20. graphscope/flex/rest/models/{groot_edge_type_relations_inner.py → base_vertex_type_x_csr_params.py} +15 -17
  21. graphscope/flex/rest/models/column_mapping.py +13 -13
  22. graphscope/flex/rest/models/{edge_mapping_source_vertex_mappings_inner_column.py → column_mapping_column.py} +12 -12
  23. graphscope/flex/rest/models/{schema_mapping_loading_config_data_source.py → create_alert_receiver_request.py} +29 -24
  24. graphscope/flex/rest/models/{alert_rule.py → create_alert_rule_request.py} +19 -25
  25. graphscope/flex/rest/models/create_dataloading_job_response.py +88 -0
  26. graphscope/flex/rest/models/create_edge_type.py +114 -0
  27. graphscope/flex/rest/models/{graph.py → create_graph_request.py} +27 -33
  28. graphscope/flex/rest/models/create_graph_response.py +88 -0
  29. graphscope/flex/rest/models/{model_schema.py → create_graph_schema_request.py} +25 -25
  30. graphscope/flex/rest/models/{groot_vertex_type.py → create_property_meta.py} +32 -25
  31. graphscope/flex/rest/models/{graph_stored_procedures.py → create_stored_proc_request.py} +26 -23
  32. graphscope/flex/rest/models/create_stored_proc_response.py +88 -0
  33. graphscope/flex/rest/models/create_vertex_type.py +108 -0
  34. graphscope/flex/rest/models/{groot_dataloading_job_config.py → dataloading_job_config.py} +45 -21
  35. graphscope/flex/rest/models/{groot_dataloading_job_config_edges_inner.py → dataloading_job_config_edges_inner.py} +12 -12
  36. graphscope/flex/rest/models/{schema_mapping_loading_config.py → dataloading_job_config_loading_config.py} +16 -22
  37. graphscope/flex/rest/models/{schema_mapping_loading_config_format.py → dataloading_job_config_loading_config_format.py} +12 -12
  38. graphscope/flex/rest/models/dataloading_job_config_vertices_inner.py +88 -0
  39. graphscope/flex/rest/models/dataloading_mr_job_config.py +88 -0
  40. graphscope/flex/rest/models/date_type.py +88 -0
  41. graphscope/flex/rest/models/edge_mapping.py +23 -25
  42. graphscope/flex/rest/models/edge_mapping_type_triplet.py +12 -12
  43. graphscope/flex/rest/models/error.py +90 -0
  44. graphscope/flex/rest/models/{alert_message.py → get_alert_message_response.py} +23 -32
  45. graphscope/flex/rest/models/{alert_receiver.py → get_alert_receiver_response.py} +22 -25
  46. graphscope/flex/rest/models/{connection_status.py → get_alert_rule_response.py} +37 -33
  47. graphscope/flex/rest/models/{edge_type.py → get_edge_type.py} +33 -27
  48. graphscope/flex/rest/models/get_graph_response.py +139 -0
  49. graphscope/flex/rest/models/{groot_schema.py → get_graph_schema_response.py} +32 -32
  50. graphscope/flex/rest/models/get_pod_log_response.py +88 -0
  51. graphscope/flex/rest/models/{edge_mapping_destination_vertex_mappings_inner.py → get_property_meta.py} +34 -19
  52. graphscope/flex/rest/models/get_resource_usage_response.py +105 -0
  53. graphscope/flex/rest/models/get_storage_usage_response.py +88 -0
  54. graphscope/flex/rest/models/{procedure.py → get_stored_proc_response.py} +37 -36
  55. graphscope/flex/rest/models/{groot_edge_type.py → get_vertex_type.py} +33 -31
  56. graphscope/flex/rest/models/gs_data_type.py +152 -0
  57. graphscope/flex/rest/models/job_status.py +14 -17
  58. graphscope/flex/rest/models/{connection.py → long_text.py} +20 -15
  59. graphscope/flex/rest/models/node_status.py +15 -15
  60. graphscope/flex/rest/models/{procedure_params_inner.py → parameter.py} +20 -16
  61. graphscope/flex/rest/models/{deployment_info_graphs_info_value.py → pod_status.py} +34 -20
  62. graphscope/flex/rest/models/{property_property_type.py → primitive_type.py} +16 -19
  63. graphscope/flex/rest/models/resource_usage.py +92 -0
  64. graphscope/flex/rest/models/{deployment_info.py → running_deployment_info.py} +42 -45
  65. graphscope/flex/rest/models/running_deployment_status.py +124 -0
  66. graphscope/flex/rest/models/schema_mapping.py +18 -26
  67. graphscope/flex/rest/models/service_status.py +22 -13
  68. graphscope/flex/rest/models/service_status_sdk_endpoints.py +8 -8
  69. graphscope/flex/rest/models/start_service_request.py +11 -11
  70. graphscope/flex/rest/models/{groot_graph.py → stored_procedure_meta.py} +46 -36
  71. graphscope/flex/rest/models/string_type.py +92 -0
  72. graphscope/flex/rest/models/string_type_string.py +124 -0
  73. graphscope/flex/rest/models/temporal_type.py +92 -0
  74. graphscope/flex/rest/models/temporal_type_temporal.py +138 -0
  75. graphscope/flex/rest/models/time_stamp_type.py +88 -0
  76. graphscope/flex/rest/models/update_alert_message_status_request.py +97 -0
  77. graphscope/flex/rest/models/update_stored_proc_request.py +88 -0
  78. graphscope/flex/rest/models/upload_file_response.py +90 -0
  79. graphscope/flex/rest/models/vertex_mapping.py +13 -13
  80. graphscope/flex/rest/rest.py +4 -2
  81. graphscope_flex-0.29.0a20241008.dist-info/METADATA +19 -0
  82. graphscope_flex-0.29.0a20241008.dist-info/RECORD +86 -0
  83. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.29.0a20241008.dist-info}/WHEEL +1 -1
  84. graphscope/flex/rest/api/connection_api.py +0 -550
  85. graphscope/flex/rest/api/datasource_api.py +0 -2308
  86. graphscope/flex/rest/models/data_source.py +0 -106
  87. graphscope/flex/rest/models/deployment_status.py +0 -108
  88. graphscope/flex/rest/models/edge_data_source.py +0 -112
  89. graphscope/flex/rest/models/edge_mapping_source_vertex_mappings_inner.py +0 -92
  90. graphscope/flex/rest/models/groot_graph_gremlin_interface.py +0 -94
  91. graphscope/flex/rest/models/groot_property.py +0 -104
  92. graphscope/flex/rest/models/update_alert_messages_request.py +0 -110
  93. graphscope/flex/rest/models/vertex_data_source.py +0 -104
  94. graphscope_flex-0.27.0.dist-info/METADATA +0 -17
  95. graphscope_flex-0.27.0.dist-info/RECORD +0 -71
  96. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.29.0a20241008.dist-info}/top_level.txt +0 -0
@@ -3,9 +3,9 @@
3
3
  """
4
4
  GraphScope FLEX HTTP SERVICE API
5
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)
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
7
 
8
- The version of the OpenAPI document: 0.9.1
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Contact: graphscope@alibaba-inc.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,25 +18,28 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
- from graphscope.flex.rest.models.groot_property import GrootProperty
23
+ from graphscope.flex.rest.models.gs_data_type import GSDataType
24
24
  from typing import Optional, Set
25
25
  from typing_extensions import Self
26
26
 
27
- class GrootVertexType(BaseModel):
27
+ class CreatePropertyMeta(BaseModel):
28
28
  """
29
- GrootVertexType
29
+ CreatePropertyMeta
30
30
  """ # noqa: E501
31
- label: Optional[StrictStr] = None
32
- properties: Optional[List[GrootProperty]] = None
33
- __properties: ClassVar[List[str]] = ["label", "properties"]
31
+ property_name: StrictStr
32
+ property_type: GSDataType
33
+ nullable: Optional[StrictBool] = None
34
+ default_value: Optional[Any] = None
35
+ description: Optional[StrictStr] = None
36
+ __properties: ClassVar[List[str]] = ["property_name", "property_type", "nullable", "default_value", "description"]
34
37
 
35
- model_config = {
36
- "populate_by_name": True,
37
- "validate_assignment": True,
38
- "protected_namespaces": (),
39
- }
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
40
43
 
41
44
 
42
45
  def to_str(self) -> str:
@@ -50,7 +53,7 @@ class GrootVertexType(BaseModel):
50
53
 
51
54
  @classmethod
52
55
  def from_json(cls, json_str: str) -> Optional[Self]:
53
- """Create an instance of GrootVertexType from a JSON string"""
56
+ """Create an instance of CreatePropertyMeta from a JSON string"""
54
57
  return cls.from_dict(json.loads(json_str))
55
58
 
56
59
  def to_dict(self) -> Dict[str, Any]:
@@ -71,18 +74,19 @@ class GrootVertexType(BaseModel):
71
74
  exclude=excluded_fields,
72
75
  exclude_none=True,
73
76
  )
74
- # override the default output from pydantic by calling `to_dict()` of each item in properties (list)
75
- _items = []
76
- if self.properties:
77
- for _item in self.properties:
78
- if _item:
79
- _items.append(_item.to_dict())
80
- _dict['properties'] = _items
77
+ # override the default output from pydantic by calling `to_dict()` of property_type
78
+ if self.property_type:
79
+ _dict['property_type'] = self.property_type.to_dict()
80
+ # set to None if default_value (nullable) is None
81
+ # and model_fields_set contains the field
82
+ if self.default_value is None and "default_value" in self.model_fields_set:
83
+ _dict['default_value'] = None
84
+
81
85
  return _dict
82
86
 
83
87
  @classmethod
84
88
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
- """Create an instance of GrootVertexType from a dict"""
89
+ """Create an instance of CreatePropertyMeta from a dict"""
86
90
  if obj is None:
87
91
  return None
88
92
 
@@ -90,8 +94,11 @@ class GrootVertexType(BaseModel):
90
94
  return cls.model_validate(obj)
91
95
 
92
96
  _obj = cls.model_validate({
93
- "label": obj.get("label"),
94
- "properties": [GrootProperty.from_dict(_item) for _item in obj["properties"]] if obj.get("properties") is not None else None
97
+ "property_name": obj.get("property_name"),
98
+ "property_type": GSDataType.from_dict(obj["property_type"]) if obj.get("property_type") is not None else None,
99
+ "nullable": obj.get("nullable"),
100
+ "default_value": obj.get("default_value"),
101
+ "description": obj.get("description")
95
102
  })
96
103
  return _obj
97
104
 
@@ -3,9 +3,9 @@
3
3
  """
4
4
  GraphScope FLEX HTTP SERVICE API
5
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)
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
7
 
8
- The version of the OpenAPI document: 0.9.1
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Contact: graphscope@alibaba-inc.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,33 +18,33 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, StrictStr, field_validator
21
+ from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class GraphStoredProcedures(BaseModel):
26
+ class CreateStoredProcRequest(BaseModel):
27
27
  """
28
- GraphStoredProcedures
28
+ CreateStoredProcRequest
29
29
  """ # noqa: E501
30
- directory: Optional[StrictStr] = None
31
- __properties: ClassVar[List[str]] = ["directory"]
32
-
33
- @field_validator('directory')
34
- def directory_validate_enum(cls, value):
30
+ name: StrictStr
31
+ description: Optional[StrictStr] = None
32
+ type: StrictStr
33
+ query: StrictStr
34
+ __properties: ClassVar[List[str]] = ["name", "description", "type", "query"]
35
+
36
+ @field_validator('type')
37
+ def type_validate_enum(cls, value):
35
38
  """Validates the enum"""
36
- if value is None:
37
- return value
38
-
39
- if value not in set(['plugins']):
40
- raise ValueError("must be one of enum values ('plugins')")
39
+ if value not in set(['cpp', 'cypher']):
40
+ raise ValueError("must be one of enum values ('cpp', 'cypher')")
41
41
  return value
42
42
 
43
- model_config = {
44
- "populate_by_name": True,
45
- "validate_assignment": True,
46
- "protected_namespaces": (),
47
- }
43
+ model_config = ConfigDict(
44
+ populate_by_name=True,
45
+ validate_assignment=True,
46
+ protected_namespaces=(),
47
+ )
48
48
 
49
49
 
50
50
  def to_str(self) -> str:
@@ -58,7 +58,7 @@ class GraphStoredProcedures(BaseModel):
58
58
 
59
59
  @classmethod
60
60
  def from_json(cls, json_str: str) -> Optional[Self]:
61
- """Create an instance of GraphStoredProcedures from a JSON string"""
61
+ """Create an instance of CreateStoredProcRequest from a JSON string"""
62
62
  return cls.from_dict(json.loads(json_str))
63
63
 
64
64
  def to_dict(self) -> Dict[str, Any]:
@@ -83,7 +83,7 @@ class GraphStoredProcedures(BaseModel):
83
83
 
84
84
  @classmethod
85
85
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
- """Create an instance of GraphStoredProcedures from a dict"""
86
+ """Create an instance of CreateStoredProcRequest from a dict"""
87
87
  if obj is None:
88
88
  return None
89
89
 
@@ -91,7 +91,10 @@ class GraphStoredProcedures(BaseModel):
91
91
  return cls.model_validate(obj)
92
92
 
93
93
  _obj = cls.model_validate({
94
- "directory": obj.get("directory")
94
+ "name": obj.get("name"),
95
+ "description": obj.get("description"),
96
+ "type": obj.get("type"),
97
+ "query": obj.get("query")
95
98
  })
96
99
  return _obj
97
100
 
@@ -0,0 +1,88 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ GraphScope FLEX HTTP SERVICE API
5
+
6
+ This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: graphscope@alibaba-inc.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class CreateStoredProcResponse(BaseModel):
27
+ """
28
+ CreateStoredProcResponse
29
+ """ # noqa: E501
30
+ stored_procedure_id: StrictStr
31
+ __properties: ClassVar[List[str]] = ["stored_procedure_id"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of CreateStoredProcResponse 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 CreateStoredProcResponse 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
+ "stored_procedure_id": obj.get("stored_procedure_id")
85
+ })
86
+ return _obj
87
+
88
+
@@ -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, 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.create_property_meta import CreatePropertyMeta
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class CreateVertexType(BaseModel):
29
+ """
30
+ CreateVertexType
31
+ """ # noqa: E501
32
+ type_name: StrictStr
33
+ primary_keys: List[StrictStr]
34
+ x_csr_params: Optional[BaseVertexTypeXCsrParams] = None
35
+ properties: List[CreatePropertyMeta]
36
+ description: Optional[StrictStr] = None
37
+ __properties: ClassVar[List[str]] = ["type_name", "primary_keys", "x_csr_params", "properties", "description"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of CreateVertexType from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of x_csr_params
79
+ if self.x_csr_params:
80
+ _dict['x_csr_params'] = self.x_csr_params.to_dict()
81
+ # override the default output from pydantic by calling `to_dict()` of each item in properties (list)
82
+ _items = []
83
+ if self.properties:
84
+ for _item_properties in self.properties:
85
+ if _item_properties:
86
+ _items.append(_item_properties.to_dict())
87
+ _dict['properties'] = _items
88
+ return _dict
89
+
90
+ @classmethod
91
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
92
+ """Create an instance of CreateVertexType 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
+ "type_name": obj.get("type_name"),
101
+ "primary_keys": obj.get("primary_keys"),
102
+ "x_csr_params": BaseVertexTypeXCsrParams.from_dict(obj["x_csr_params"]) if obj.get("x_csr_params") is not None else None,
103
+ "properties": [CreatePropertyMeta.from_dict(_item) for _item in obj["properties"]] if obj.get("properties") is not None else None,
104
+ "description": obj.get("description")
105
+ })
106
+ return _obj
107
+
108
+
@@ -3,9 +3,9 @@
3
3
  """
4
4
  GraphScope FLEX HTTP SERVICE API
5
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)
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
7
 
8
- The version of the OpenAPI document: 0.9.1
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Contact: graphscope@alibaba-inc.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,21 +18,24 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, Field, StrictStr, field_validator
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
- from graphscope.flex.rest.models.groot_dataloading_job_config_edges_inner import GrootDataloadingJobConfigEdgesInner
23
+ from graphscope.flex.rest.models.dataloading_job_config_edges_inner import DataloadingJobConfigEdgesInner
24
+ from graphscope.flex.rest.models.dataloading_job_config_loading_config import DataloadingJobConfigLoadingConfig
25
+ from graphscope.flex.rest.models.dataloading_job_config_vertices_inner import DataloadingJobConfigVerticesInner
24
26
  from typing import Optional, Set
25
27
  from typing_extensions import Self
26
28
 
27
- class GrootDataloadingJobConfig(BaseModel):
29
+ class DataloadingJobConfig(BaseModel):
28
30
  """
29
- GrootDataloadingJobConfig
31
+ DataloadingJobConfig
30
32
  """ # noqa: E501
31
- vertices: Optional[List[StrictStr]] = None
32
- edges: Optional[List[GrootDataloadingJobConfigEdgesInner]] = None
33
+ loading_config: DataloadingJobConfigLoadingConfig
34
+ vertices: List[DataloadingJobConfigVerticesInner]
35
+ edges: List[DataloadingJobConfigEdgesInner]
33
36
  schedule: Optional[StrictStr] = Field(default=None, description="format with '2023-02-21 11:56:30'")
34
37
  repeat: Optional[StrictStr] = None
35
- __properties: ClassVar[List[str]] = ["vertices", "edges", "schedule", "repeat"]
38
+ __properties: ClassVar[List[str]] = ["loading_config", "vertices", "edges", "schedule", "repeat"]
36
39
 
37
40
  @field_validator('repeat')
38
41
  def repeat_validate_enum(cls, value):
@@ -44,11 +47,11 @@ class GrootDataloadingJobConfig(BaseModel):
44
47
  raise ValueError("must be one of enum values ('once', 'day', 'week')")
45
48
  return value
46
49
 
47
- model_config = {
48
- "populate_by_name": True,
49
- "validate_assignment": True,
50
- "protected_namespaces": (),
51
- }
50
+ model_config = ConfigDict(
51
+ populate_by_name=True,
52
+ validate_assignment=True,
53
+ protected_namespaces=(),
54
+ )
52
55
 
53
56
 
54
57
  def to_str(self) -> str:
@@ -62,7 +65,7 @@ class GrootDataloadingJobConfig(BaseModel):
62
65
 
63
66
  @classmethod
64
67
  def from_json(cls, json_str: str) -> Optional[Self]:
65
- """Create an instance of GrootDataloadingJobConfig from a JSON string"""
68
+ """Create an instance of DataloadingJobConfig from a JSON string"""
66
69
  return cls.from_dict(json.loads(json_str))
67
70
 
68
71
  def to_dict(self) -> Dict[str, Any]:
@@ -83,18 +86,38 @@ class GrootDataloadingJobConfig(BaseModel):
83
86
  exclude=excluded_fields,
84
87
  exclude_none=True,
85
88
  )
89
+ # override the default output from pydantic by calling `to_dict()` of loading_config
90
+ if self.loading_config:
91
+ _dict['loading_config'] = self.loading_config.to_dict()
92
+ # override the default output from pydantic by calling `to_dict()` of each item in vertices (list)
93
+ _items = []
94
+ if self.vertices:
95
+ for _item_vertices in self.vertices:
96
+ if _item_vertices:
97
+ _items.append(_item_vertices.to_dict())
98
+ _dict['vertices'] = _items
86
99
  # override the default output from pydantic by calling `to_dict()` of each item in edges (list)
87
100
  _items = []
88
101
  if self.edges:
89
- for _item in self.edges:
90
- if _item:
91
- _items.append(_item.to_dict())
102
+ for _item_edges in self.edges:
103
+ if _item_edges:
104
+ _items.append(_item_edges.to_dict())
92
105
  _dict['edges'] = _items
106
+ # set to None if schedule (nullable) is None
107
+ # and model_fields_set contains the field
108
+ if self.schedule is None and "schedule" in self.model_fields_set:
109
+ _dict['schedule'] = None
110
+
111
+ # set to None if repeat (nullable) is None
112
+ # and model_fields_set contains the field
113
+ if self.repeat is None and "repeat" in self.model_fields_set:
114
+ _dict['repeat'] = None
115
+
93
116
  return _dict
94
117
 
95
118
  @classmethod
96
119
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
97
- """Create an instance of GrootDataloadingJobConfig from a dict"""
120
+ """Create an instance of DataloadingJobConfig from a dict"""
98
121
  if obj is None:
99
122
  return None
100
123
 
@@ -102,8 +125,9 @@ class GrootDataloadingJobConfig(BaseModel):
102
125
  return cls.model_validate(obj)
103
126
 
104
127
  _obj = cls.model_validate({
105
- "vertices": obj.get("vertices"),
106
- "edges": [GrootDataloadingJobConfigEdgesInner.from_dict(_item) for _item in obj["edges"]] if obj.get("edges") is not None else None,
128
+ "loading_config": DataloadingJobConfigLoadingConfig.from_dict(obj["loading_config"]) if obj.get("loading_config") is not None else None,
129
+ "vertices": [DataloadingJobConfigVerticesInner.from_dict(_item) for _item in obj["vertices"]] if obj.get("vertices") is not None else None,
130
+ "edges": [DataloadingJobConfigEdgesInner.from_dict(_item) for _item in obj["edges"]] if obj.get("edges") is not None else None,
107
131
  "schedule": obj.get("schedule"),
108
132
  "repeat": obj.get("repeat")
109
133
  })
@@ -3,9 +3,9 @@
3
3
  """
4
4
  GraphScope FLEX HTTP SERVICE API
5
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)
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
7
 
8
- The version of the OpenAPI document: 0.9.1
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Contact: graphscope@alibaba-inc.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,25 +18,25 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class GrootDataloadingJobConfigEdgesInner(BaseModel):
26
+ class DataloadingJobConfigEdgesInner(BaseModel):
27
27
  """
28
- GrootDataloadingJobConfigEdgesInner
28
+ DataloadingJobConfigEdgesInner
29
29
  """ # noqa: E501
30
30
  type_name: Optional[StrictStr] = None
31
31
  source_vertex: Optional[StrictStr] = None
32
32
  destination_vertex: Optional[StrictStr] = None
33
33
  __properties: ClassVar[List[str]] = ["type_name", "source_vertex", "destination_vertex"]
34
34
 
35
- model_config = {
36
- "populate_by_name": True,
37
- "validate_assignment": True,
38
- "protected_namespaces": (),
39
- }
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
40
 
41
41
 
42
42
  def to_str(self) -> str:
@@ -50,7 +50,7 @@ class GrootDataloadingJobConfigEdgesInner(BaseModel):
50
50
 
51
51
  @classmethod
52
52
  def from_json(cls, json_str: str) -> Optional[Self]:
53
- """Create an instance of GrootDataloadingJobConfigEdgesInner from a JSON string"""
53
+ """Create an instance of DataloadingJobConfigEdgesInner from a JSON string"""
54
54
  return cls.from_dict(json.loads(json_str))
55
55
 
56
56
  def to_dict(self) -> Dict[str, Any]:
@@ -75,7 +75,7 @@ class GrootDataloadingJobConfigEdgesInner(BaseModel):
75
75
 
76
76
  @classmethod
77
77
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
- """Create an instance of GrootDataloadingJobConfigEdgesInner from a dict"""
78
+ """Create an instance of DataloadingJobConfigEdgesInner from a dict"""
79
79
  if obj is None:
80
80
  return None
81
81