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
@@ -1,106 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- GraphScope FLEX HTTP SERVICE API
5
-
6
- This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
7
-
8
- The version of the OpenAPI document: 0.9.1
9
- Contact: graphscope@alibaba-inc.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from graphscope.flex.rest.models.edge_data_source import EdgeDataSource
24
- from graphscope.flex.rest.models.vertex_data_source import VertexDataSource
25
- from typing import Optional, Set
26
- from typing_extensions import Self
27
-
28
- class DataSource(BaseModel):
29
- """
30
- DataSource
31
- """ # noqa: E501
32
- vertices_datasource: Optional[List[VertexDataSource]] = None
33
- edges_datasource: Optional[List[EdgeDataSource]] = None
34
- __properties: ClassVar[List[str]] = ["vertices_datasource", "edges_datasource"]
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 DataSource from a JSON string"""
55
- return cls.from_dict(json.loads(json_str))
56
-
57
- def to_dict(self) -> Dict[str, Any]:
58
- """Return the dictionary representation of the model using alias.
59
-
60
- This has the following differences from calling pydantic's
61
- `self.model_dump(by_alias=True)`:
62
-
63
- * `None` is only added to the output dict for nullable fields that
64
- were set at model initialization. Other fields with value `None`
65
- are ignored.
66
- """
67
- excluded_fields: Set[str] = set([
68
- ])
69
-
70
- _dict = self.model_dump(
71
- by_alias=True,
72
- exclude=excluded_fields,
73
- exclude_none=True,
74
- )
75
- # override the default output from pydantic by calling `to_dict()` of each item in vertices_datasource (list)
76
- _items = []
77
- if self.vertices_datasource:
78
- for _item in self.vertices_datasource:
79
- if _item:
80
- _items.append(_item.to_dict())
81
- _dict['vertices_datasource'] = _items
82
- # override the default output from pydantic by calling `to_dict()` of each item in edges_datasource (list)
83
- _items = []
84
- if self.edges_datasource:
85
- for _item in self.edges_datasource:
86
- if _item:
87
- _items.append(_item.to_dict())
88
- _dict['edges_datasource'] = _items
89
- return _dict
90
-
91
- @classmethod
92
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
- """Create an instance of DataSource 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
- "vertices_datasource": [VertexDataSource.from_dict(_item) for _item in obj["vertices_datasource"]] if obj.get("vertices_datasource") is not None else None,
102
- "edges_datasource": [EdgeDataSource.from_dict(_item) for _item in obj["edges_datasource"]] if obj.get("edges_datasource") is not None else None
103
- })
104
- return _obj
105
-
106
-
@@ -1,108 +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: 0.9.1
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, StrictInt, 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 DeploymentStatus(BaseModel):
27
- """
28
- K8s only
29
- """ # noqa: E501
30
- name: Optional[StrictStr] = None
31
- container: Optional[List[StrictStr]] = None
32
- image: Optional[List[StrictStr]] = None
33
- labels: Optional[List[StrictStr]] = None
34
- node: Optional[StrictStr] = None
35
- status: Optional[StrictStr] = None
36
- restart_count: Optional[StrictInt] = None
37
- cpu_value: Optional[StrictInt] = Field(default=None, description="cpu value in millicore")
38
- memory_value: Optional[StrictInt] = Field(default=None, description="memory value in megabytes")
39
- timestamp: Optional[StrictStr] = None
40
- creation_time: Optional[StrictStr] = None
41
- __properties: ClassVar[List[str]] = ["name", "container", "image", "labels", "node", "status", "restart_count", "cpu_value", "memory_value", "timestamp", "creation_time"]
42
-
43
- model_config = {
44
- "populate_by_name": True,
45
- "validate_assignment": True,
46
- "protected_namespaces": (),
47
- }
48
-
49
-
50
- def to_str(self) -> str:
51
- """Returns the string representation of the model using alias"""
52
- return pprint.pformat(self.model_dump(by_alias=True))
53
-
54
- def to_json(self) -> str:
55
- """Returns the JSON representation of the model using alias"""
56
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
57
- return json.dumps(self.to_dict())
58
-
59
- @classmethod
60
- def from_json(cls, json_str: str) -> Optional[Self]:
61
- """Create an instance of DeploymentStatus from a JSON string"""
62
- return cls.from_dict(json.loads(json_str))
63
-
64
- def to_dict(self) -> Dict[str, Any]:
65
- """Return the dictionary representation of the model using alias.
66
-
67
- This has the following differences from calling pydantic's
68
- `self.model_dump(by_alias=True)`:
69
-
70
- * `None` is only added to the output dict for nullable fields that
71
- were set at model initialization. Other fields with value `None`
72
- are ignored.
73
- """
74
- excluded_fields: Set[str] = set([
75
- ])
76
-
77
- _dict = self.model_dump(
78
- by_alias=True,
79
- exclude=excluded_fields,
80
- exclude_none=True,
81
- )
82
- return _dict
83
-
84
- @classmethod
85
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
- """Create an instance of DeploymentStatus from a dict"""
87
- if obj is None:
88
- return None
89
-
90
- if not isinstance(obj, dict):
91
- return cls.model_validate(obj)
92
-
93
- _obj = cls.model_validate({
94
- "name": obj.get("name"),
95
- "container": obj.get("container"),
96
- "image": obj.get("image"),
97
- "labels": obj.get("labels"),
98
- "node": obj.get("node"),
99
- "status": obj.get("status"),
100
- "restart_count": obj.get("restart_count"),
101
- "cpu_value": obj.get("cpu_value"),
102
- "memory_value": obj.get("memory_value"),
103
- "timestamp": obj.get("timestamp"),
104
- "creation_time": obj.get("creation_time")
105
- })
106
- return _obj
107
-
108
-
@@ -1,112 +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: 0.9.1
9
- Contact: graphscope@alibaba-inc.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, StrictStr, field_validator
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class EdgeDataSource(BaseModel):
27
- """
28
- EdgeDataSource
29
- """ # noqa: E501
30
- data_source: Optional[StrictStr] = None
31
- type_name: Optional[StrictStr] = None
32
- source_vertex: Optional[StrictStr] = None
33
- destination_vertex: Optional[StrictStr] = None
34
- location: Optional[StrictStr] = None
35
- source_pk_column_map: Optional[Dict[str, Any]] = None
36
- destination_pk_column_map: Optional[Dict[str, Any]] = None
37
- property_mapping: Optional[Dict[str, Any]] = None
38
- __properties: ClassVar[List[str]] = ["data_source", "type_name", "source_vertex", "destination_vertex", "location", "source_pk_column_map", "destination_pk_column_map", "property_mapping"]
39
-
40
- @field_validator('data_source')
41
- def data_source_validate_enum(cls, value):
42
- """Validates the enum"""
43
- if value is None:
44
- return value
45
-
46
- if value not in set(['ODPS', 'FILE']):
47
- raise ValueError("must be one of enum values ('ODPS', 'FILE')")
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 EdgeDataSource 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
- return _dict
90
-
91
- @classmethod
92
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
- """Create an instance of EdgeDataSource 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
- "data_source": obj.get("data_source"),
102
- "type_name": obj.get("type_name"),
103
- "source_vertex": obj.get("source_vertex"),
104
- "destination_vertex": obj.get("destination_vertex"),
105
- "location": obj.get("location"),
106
- "source_pk_column_map": obj.get("source_pk_column_map"),
107
- "destination_pk_column_map": obj.get("destination_pk_column_map"),
108
- "property_mapping": obj.get("property_mapping")
109
- })
110
- return _obj
111
-
112
-
@@ -1,92 +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: 0.9.1
9
- Contact: graphscope@alibaba-inc.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from graphscope.flex.rest.models.edge_mapping_source_vertex_mappings_inner_column import EdgeMappingSourceVertexMappingsInnerColumn
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class EdgeMappingSourceVertexMappingsInner(BaseModel):
28
- """
29
- Mapping column index to the primary key of source vertex
30
- """ # noqa: E501
31
- column: Optional[EdgeMappingSourceVertexMappingsInnerColumn] = None
32
- __properties: ClassVar[List[str]] = ["column"]
33
-
34
- model_config = {
35
- "populate_by_name": True,
36
- "validate_assignment": True,
37
- "protected_namespaces": (),
38
- }
39
-
40
-
41
- def to_str(self) -> str:
42
- """Returns the string representation of the model using alias"""
43
- return pprint.pformat(self.model_dump(by_alias=True))
44
-
45
- def to_json(self) -> str:
46
- """Returns the JSON representation of the model using alias"""
47
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
- return json.dumps(self.to_dict())
49
-
50
- @classmethod
51
- def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of EdgeMappingSourceVertexMappingsInner from a JSON string"""
53
- return cls.from_dict(json.loads(json_str))
54
-
55
- def to_dict(self) -> Dict[str, Any]:
56
- """Return the dictionary representation of the model using alias.
57
-
58
- This has the following differences from calling pydantic's
59
- `self.model_dump(by_alias=True)`:
60
-
61
- * `None` is only added to the output dict for nullable fields that
62
- were set at model initialization. Other fields with value `None`
63
- are ignored.
64
- """
65
- excluded_fields: Set[str] = set([
66
- ])
67
-
68
- _dict = self.model_dump(
69
- by_alias=True,
70
- exclude=excluded_fields,
71
- exclude_none=True,
72
- )
73
- # override the default output from pydantic by calling `to_dict()` of column
74
- if self.column:
75
- _dict['column'] = self.column.to_dict()
76
- return _dict
77
-
78
- @classmethod
79
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
- """Create an instance of EdgeMappingSourceVertexMappingsInner from a dict"""
81
- if obj is None:
82
- return None
83
-
84
- if not isinstance(obj, dict):
85
- return cls.model_validate(obj)
86
-
87
- _obj = cls.model_validate({
88
- "column": EdgeMappingSourceVertexMappingsInnerColumn.from_dict(obj["column"]) if obj.get("column") is not None else None
89
- })
90
- return _obj
91
-
92
-
@@ -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: 0.9.1
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 GrootGraphGremlinInterface(BaseModel):
27
- """
28
- GrootGraphGremlinInterface
29
- """ # noqa: E501
30
- gremlin_endpoint: Optional[StrictStr] = None
31
- grpc_endpoint: Optional[StrictStr] = None
32
- username: Optional[StrictStr] = None
33
- password: Optional[StrictStr] = None
34
- __properties: ClassVar[List[str]] = ["gremlin_endpoint", "grpc_endpoint", "username", "password"]
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 GrootGraphGremlinInterface 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 GrootGraphGremlinInterface 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
- "gremlin_endpoint": obj.get("gremlin_endpoint"),
88
- "grpc_endpoint": obj.get("grpc_endpoint"),
89
- "username": obj.get("username"),
90
- "password": obj.get("password")
91
- })
92
- return _obj
93
-
94
-
@@ -1,104 +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: 0.9.1
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, StrictInt, 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 GrootProperty(BaseModel):
27
- """
28
- GrootProperty
29
- """ # noqa: E501
30
- id: Optional[StrictInt] = None
31
- name: Optional[StrictStr] = None
32
- type: Optional[StrictStr] = None
33
- is_primary_key: Optional[StrictBool] = None
34
- __properties: ClassVar[List[str]] = ["id", "name", "type", "is_primary_key"]
35
-
36
- @field_validator('type')
37
- def type_validate_enum(cls, value):
38
- """Validates the enum"""
39
- if value is None:
40
- return value
41
-
42
- if value not in set(['STRING', 'LONG', 'DOUBLE']):
43
- raise ValueError("must be one of enum values ('STRING', 'LONG', 'DOUBLE')")
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 GrootProperty 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 GrootProperty 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
- "name": obj.get("name"),
99
- "type": obj.get("type"),
100
- "is_primary_key": obj.get("is_primary_key")
101
- })
102
- return _obj
103
-
104
-