graphscope-flex 0.27.0__py2.py3-none-any.whl → 0.29.0a20250115__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
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/{procedure_params_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/{groot_edge_type_relations_inner.py → dataloading_job_config_vertices_inner.py} +15 -17
  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/parameter.py +96 -0
  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 +29 -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.0a20250115.dist-info/METADATA +19 -0
  82. graphscope_flex-0.29.0a20250115.dist-info/RECORD +86 -0
  83. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.29.0a20250115.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.0a20250115.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,21 +18,19 @@ 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
- from graphscope.flex.rest.models.schema_mapping_loading_config_data_source import SchemaMappingLoadingConfigDataSource
24
- from graphscope.flex.rest.models.schema_mapping_loading_config_format import SchemaMappingLoadingConfigFormat
23
+ from graphscope.flex.rest.models.dataloading_job_config_loading_config_format import DataloadingJobConfigLoadingConfigFormat
25
24
  from typing import Optional, Set
26
25
  from typing_extensions import Self
27
26
 
28
- class SchemaMappingLoadingConfig(BaseModel):
27
+ class DataloadingJobConfigLoadingConfig(BaseModel):
29
28
  """
30
- SchemaMappingLoadingConfig
29
+ DataloadingJobConfigLoadingConfig
31
30
  """ # noqa: E501
32
- data_source: Optional[SchemaMappingLoadingConfigDataSource] = None
33
31
  import_option: Optional[StrictStr] = None
34
- format: Optional[SchemaMappingLoadingConfigFormat] = None
35
- __properties: ClassVar[List[str]] = ["data_source", "import_option", "format"]
32
+ format: Optional[DataloadingJobConfigLoadingConfigFormat] = None
33
+ __properties: ClassVar[List[str]] = ["import_option", "format"]
36
34
 
37
35
  @field_validator('import_option')
38
36
  def import_option_validate_enum(cls, value):
@@ -44,11 +42,11 @@ class SchemaMappingLoadingConfig(BaseModel):
44
42
  raise ValueError("must be one of enum values ('init', 'overwrite')")
45
43
  return value
46
44
 
47
- model_config = {
48
- "populate_by_name": True,
49
- "validate_assignment": True,
50
- "protected_namespaces": (),
51
- }
45
+ model_config = ConfigDict(
46
+ populate_by_name=True,
47
+ validate_assignment=True,
48
+ protected_namespaces=(),
49
+ )
52
50
 
53
51
 
54
52
  def to_str(self) -> str:
@@ -62,7 +60,7 @@ class SchemaMappingLoadingConfig(BaseModel):
62
60
 
63
61
  @classmethod
64
62
  def from_json(cls, json_str: str) -> Optional[Self]:
65
- """Create an instance of SchemaMappingLoadingConfig from a JSON string"""
63
+ """Create an instance of DataloadingJobConfigLoadingConfig from a JSON string"""
66
64
  return cls.from_dict(json.loads(json_str))
67
65
 
68
66
  def to_dict(self) -> Dict[str, Any]:
@@ -83,9 +81,6 @@ class SchemaMappingLoadingConfig(BaseModel):
83
81
  exclude=excluded_fields,
84
82
  exclude_none=True,
85
83
  )
86
- # override the default output from pydantic by calling `to_dict()` of data_source
87
- if self.data_source:
88
- _dict['data_source'] = self.data_source.to_dict()
89
84
  # override the default output from pydantic by calling `to_dict()` of format
90
85
  if self.format:
91
86
  _dict['format'] = self.format.to_dict()
@@ -93,7 +88,7 @@ class SchemaMappingLoadingConfig(BaseModel):
93
88
 
94
89
  @classmethod
95
90
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
96
- """Create an instance of SchemaMappingLoadingConfig from a dict"""
91
+ """Create an instance of DataloadingJobConfigLoadingConfig from a dict"""
97
92
  if obj is None:
98
93
  return None
99
94
 
@@ -101,9 +96,8 @@ class SchemaMappingLoadingConfig(BaseModel):
101
96
  return cls.model_validate(obj)
102
97
 
103
98
  _obj = cls.model_validate({
104
- "data_source": SchemaMappingLoadingConfigDataSource.from_dict(obj["data_source"]) if obj.get("data_source") is not None else None,
105
99
  "import_option": obj.get("import_option"),
106
- "format": SchemaMappingLoadingConfigFormat.from_dict(obj["format"]) if obj.get("format") is not None else None
100
+ "format": DataloadingJobConfigLoadingConfigFormat.from_dict(obj["format"]) if obj.get("format") is not None else None
107
101
  })
108
102
  return _obj
109
103
 
@@ -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,24 +18,24 @@ 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 SchemaMappingLoadingConfigFormat(BaseModel):
26
+ class DataloadingJobConfigLoadingConfigFormat(BaseModel):
27
27
  """
28
- SchemaMappingLoadingConfigFormat
28
+ DataloadingJobConfigLoadingConfigFormat
29
29
  """ # noqa: E501
30
30
  type: Optional[StrictStr] = None
31
31
  metadata: Optional[Dict[str, Any]] = None
32
32
  __properties: ClassVar[List[str]] = ["type", "metadata"]
33
33
 
34
- model_config = {
35
- "populate_by_name": True,
36
- "validate_assignment": True,
37
- "protected_namespaces": (),
38
- }
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
39
 
40
40
 
41
41
  def to_str(self) -> str:
@@ -49,7 +49,7 @@ class SchemaMappingLoadingConfigFormat(BaseModel):
49
49
 
50
50
  @classmethod
51
51
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of SchemaMappingLoadingConfigFormat from a JSON string"""
52
+ """Create an instance of DataloadingJobConfigLoadingConfigFormat from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self) -> Dict[str, Any]:
@@ -74,7 +74,7 @@ class SchemaMappingLoadingConfigFormat(BaseModel):
74
74
 
75
75
  @classmethod
76
76
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
- """Create an instance of SchemaMappingLoadingConfigFormat from a dict"""
77
+ """Create an instance of DataloadingJobConfigLoadingConfigFormat from a dict"""
78
78
  if obj is None:
79
79
  return None
80
80
 
@@ -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,24 +18,23 @@ 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 GrootEdgeTypeRelationsInner(BaseModel):
26
+ class DataloadingJobConfigVerticesInner(BaseModel):
27
27
  """
28
- GrootEdgeTypeRelationsInner
28
+ DataloadingJobConfigVerticesInner
29
29
  """ # noqa: E501
30
- src_label: Optional[StrictStr] = None
31
- dst_label: Optional[StrictStr] = None
32
- __properties: ClassVar[List[str]] = ["src_label", "dst_label"]
30
+ type_name: Optional[StrictStr] = None
31
+ __properties: ClassVar[List[str]] = ["type_name"]
33
32
 
34
- model_config = {
35
- "populate_by_name": True,
36
- "validate_assignment": True,
37
- "protected_namespaces": (),
38
- }
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
39
38
 
40
39
 
41
40
  def to_str(self) -> str:
@@ -49,7 +48,7 @@ class GrootEdgeTypeRelationsInner(BaseModel):
49
48
 
50
49
  @classmethod
51
50
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of GrootEdgeTypeRelationsInner from a JSON string"""
51
+ """Create an instance of DataloadingJobConfigVerticesInner from a JSON string"""
53
52
  return cls.from_dict(json.loads(json_str))
54
53
 
55
54
  def to_dict(self) -> Dict[str, Any]:
@@ -74,7 +73,7 @@ class GrootEdgeTypeRelationsInner(BaseModel):
74
73
 
75
74
  @classmethod
76
75
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
- """Create an instance of GrootEdgeTypeRelationsInner from a dict"""
76
+ """Create an instance of DataloadingJobConfigVerticesInner from a dict"""
78
77
  if obj is None:
79
78
  return None
80
79
 
@@ -82,8 +81,7 @@ class GrootEdgeTypeRelationsInner(BaseModel):
82
81
  return cls.model_validate(obj)
83
82
 
84
83
  _obj = cls.model_validate({
85
- "src_label": obj.get("src_label"),
86
- "dst_label": obj.get("dst_label")
84
+ "type_name": obj.get("type_name")
87
85
  })
88
86
  return _obj
89
87
 
@@ -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 DataloadingMRJobConfig(BaseModel):
27
+ """
28
+ DataloadingMRJobConfig
29
+ """ # noqa: E501
30
+ config: StrictStr
31
+ __properties: ClassVar[List[str]] = ["config"]
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 DataloadingMRJobConfig 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 DataloadingMRJobConfig 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
+ "config": obj.get("config")
85
+ })
86
+ return _obj
87
+
88
+
@@ -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 DateType(BaseModel):
27
+ """
28
+ DateType
29
+ """ # noqa: E501
30
+ date32: StrictStr
31
+ __properties: ClassVar[List[str]] = ["date32"]
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 DateType 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 DateType 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
+ "date32": obj.get("date32")
85
+ })
86
+ return _obj
87
+
88
+
@@ -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,11 +18,9 @@ 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 graphscope.flex.rest.models.column_mapping import ColumnMapping
24
- from graphscope.flex.rest.models.edge_mapping_destination_vertex_mappings_inner import EdgeMappingDestinationVertexMappingsInner
25
- from graphscope.flex.rest.models.edge_mapping_source_vertex_mappings_inner import EdgeMappingSourceVertexMappingsInner
26
24
  from graphscope.flex.rest.models.edge_mapping_type_triplet import EdgeMappingTypeTriplet
27
25
  from typing import Optional, Set
28
26
  from typing_extensions import Self
@@ -31,18 +29,18 @@ class EdgeMapping(BaseModel):
31
29
  """
32
30
  EdgeMapping
33
31
  """ # noqa: E501
34
- type_triplet: Optional[EdgeMappingTypeTriplet] = None
35
- inputs: Optional[List[StrictStr]] = None
36
- source_vertex_mappings: Optional[List[EdgeMappingSourceVertexMappingsInner]] = None
37
- destination_vertex_mappings: Optional[List[EdgeMappingDestinationVertexMappingsInner]] = None
32
+ type_triplet: EdgeMappingTypeTriplet
33
+ inputs: List[StrictStr]
34
+ source_vertex_mappings: Optional[List[ColumnMapping]] = None
35
+ destination_vertex_mappings: Optional[List[ColumnMapping]] = None
38
36
  column_mappings: Optional[List[ColumnMapping]] = None
39
37
  __properties: ClassVar[List[str]] = ["type_triplet", "inputs", "source_vertex_mappings", "destination_vertex_mappings", "column_mappings"]
40
38
 
41
- model_config = {
42
- "populate_by_name": True,
43
- "validate_assignment": True,
44
- "protected_namespaces": (),
45
- }
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
46
44
 
47
45
 
48
46
  def to_str(self) -> str:
@@ -83,23 +81,23 @@ class EdgeMapping(BaseModel):
83
81
  # override the default output from pydantic by calling `to_dict()` of each item in source_vertex_mappings (list)
84
82
  _items = []
85
83
  if self.source_vertex_mappings:
86
- for _item in self.source_vertex_mappings:
87
- if _item:
88
- _items.append(_item.to_dict())
84
+ for _item_source_vertex_mappings in self.source_vertex_mappings:
85
+ if _item_source_vertex_mappings:
86
+ _items.append(_item_source_vertex_mappings.to_dict())
89
87
  _dict['source_vertex_mappings'] = _items
90
88
  # override the default output from pydantic by calling `to_dict()` of each item in destination_vertex_mappings (list)
91
89
  _items = []
92
90
  if self.destination_vertex_mappings:
93
- for _item in self.destination_vertex_mappings:
94
- if _item:
95
- _items.append(_item.to_dict())
91
+ for _item_destination_vertex_mappings in self.destination_vertex_mappings:
92
+ if _item_destination_vertex_mappings:
93
+ _items.append(_item_destination_vertex_mappings.to_dict())
96
94
  _dict['destination_vertex_mappings'] = _items
97
95
  # override the default output from pydantic by calling `to_dict()` of each item in column_mappings (list)
98
96
  _items = []
99
97
  if self.column_mappings:
100
- for _item in self.column_mappings:
101
- if _item:
102
- _items.append(_item.to_dict())
98
+ for _item_column_mappings in self.column_mappings:
99
+ if _item_column_mappings:
100
+ _items.append(_item_column_mappings.to_dict())
103
101
  _dict['column_mappings'] = _items
104
102
  return _dict
105
103
 
@@ -115,8 +113,8 @@ class EdgeMapping(BaseModel):
115
113
  _obj = cls.model_validate({
116
114
  "type_triplet": EdgeMappingTypeTriplet.from_dict(obj["type_triplet"]) if obj.get("type_triplet") is not None else None,
117
115
  "inputs": obj.get("inputs"),
118
- "source_vertex_mappings": [EdgeMappingSourceVertexMappingsInner.from_dict(_item) for _item in obj["source_vertex_mappings"]] if obj.get("source_vertex_mappings") is not None else None,
119
- "destination_vertex_mappings": [EdgeMappingDestinationVertexMappingsInner.from_dict(_item) for _item in obj["destination_vertex_mappings"]] if obj.get("destination_vertex_mappings") is not None else None,
116
+ "source_vertex_mappings": [ColumnMapping.from_dict(_item) for _item in obj["source_vertex_mappings"]] if obj.get("source_vertex_mappings") is not None else None,
117
+ "destination_vertex_mappings": [ColumnMapping.from_dict(_item) for _item in obj["destination_vertex_mappings"]] if obj.get("destination_vertex_mappings") is not None else None,
120
118
  "column_mappings": [ColumnMapping.from_dict(_item) for _item in obj["column_mappings"]] if obj.get("column_mappings") is not None else None
121
119
  })
122
120
  return _obj
@@ -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,8 +18,8 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
21
+ from pydantic import BaseModel, ConfigDict, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
@@ -27,16 +27,16 @@ class EdgeMappingTypeTriplet(BaseModel):
27
27
  """
28
28
  source label -> [edge label] -> destination label
29
29
  """ # noqa: E501
30
- edge: Optional[StrictStr] = None
31
- source_vertex: Optional[StrictStr] = None
32
- destination_vertex: Optional[StrictStr] = None
30
+ edge: StrictStr
31
+ source_vertex: StrictStr
32
+ destination_vertex: StrictStr
33
33
  __properties: ClassVar[List[str]] = ["edge", "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:
@@ -0,0 +1,90 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ GraphScope FLEX HTTP SERVICE API
5
+
6
+ This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: graphscope@alibaba-inc.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class Error(BaseModel):
27
+ """
28
+ Error
29
+ """ # noqa: E501
30
+ code: StrictInt = Field(description="Error code")
31
+ message: StrictStr = Field(description="Error message")
32
+ __properties: ClassVar[List[str]] = ["code", "message"]
33
+
34
+ model_config = ConfigDict(
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 Error 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
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of Error from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "code": obj.get("code"),
86
+ "message": obj.get("message")
87
+ })
88
+ return _obj
89
+
90
+