graphscope-flex 0.27.0__py2.py3-none-any.whl → 0.28.0a20240919__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 (95) 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/{data_source.py → create_graph_request.py} +32 -32
  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/{graph.py → get_graph_response.py} +36 -22
  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} +35 -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} +44 -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.28.0a20240919.dist-info/METADATA +19 -0
  82. graphscope_flex-0.28.0a20240919.dist-info/RECORD +86 -0
  83. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0a20240919.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/deployment_status.py +0 -108
  87. graphscope/flex/rest/models/edge_data_source.py +0 -112
  88. graphscope/flex/rest/models/edge_mapping_source_vertex_mappings_inner.py +0 -92
  89. graphscope/flex/rest/models/groot_graph_gremlin_interface.py +0 -94
  90. graphscope/flex/rest/models/groot_property.py +0 -104
  91. graphscope/flex/rest/models/update_alert_messages_request.py +0 -110
  92. graphscope/flex/rest/models/vertex_data_source.py +0 -104
  93. graphscope_flex-0.27.0.dist-info/METADATA +0 -17
  94. graphscope_flex-0.27.0.dist-info/RECORD +0 -71
  95. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0a20240919.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,27 +18,30 @@ 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, StrictInt, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
- from graphscope.flex.rest.models.groot_edge_type_relations_inner import GrootEdgeTypeRelationsInner
24
- from graphscope.flex.rest.models.groot_property import GrootProperty
23
+ from graphscope.flex.rest.models.base_vertex_type_x_csr_params import BaseVertexTypeXCsrParams
24
+ from graphscope.flex.rest.models.get_property_meta import GetPropertyMeta
25
25
  from typing import Optional, Set
26
26
  from typing_extensions import Self
27
27
 
28
- class GrootEdgeType(BaseModel):
28
+ class GetVertexType(BaseModel):
29
29
  """
30
- GrootEdgeType
30
+ GetVertexType
31
31
  """ # noqa: E501
32
- label: Optional[StrictStr] = None
33
- relations: Optional[List[GrootEdgeTypeRelationsInner]] = None
34
- properties: Optional[List[GrootProperty]] = None
35
- __properties: ClassVar[List[str]] = ["label", "relations", "properties"]
32
+ type_name: StrictStr
33
+ primary_keys: List[StrictStr]
34
+ x_csr_params: Optional[BaseVertexTypeXCsrParams] = None
35
+ type_id: Optional[StrictInt] = None
36
+ properties: List[GetPropertyMeta]
37
+ description: Optional[StrictStr] = None
38
+ __properties: ClassVar[List[str]] = ["type_name", "primary_keys", "x_csr_params", "type_id", "properties", "description"]
36
39
 
37
- model_config = {
38
- "populate_by_name": True,
39
- "validate_assignment": True,
40
- "protected_namespaces": (),
41
- }
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
42
45
 
43
46
 
44
47
  def to_str(self) -> str:
@@ -52,7 +55,7 @@ class GrootEdgeType(BaseModel):
52
55
 
53
56
  @classmethod
54
57
  def from_json(cls, json_str: str) -> Optional[Self]:
55
- """Create an instance of GrootEdgeType from a JSON string"""
58
+ """Create an instance of GetVertexType from a JSON string"""
56
59
  return cls.from_dict(json.loads(json_str))
57
60
 
58
61
  def to_dict(self) -> Dict[str, Any]:
@@ -73,25 +76,21 @@ class GrootEdgeType(BaseModel):
73
76
  exclude=excluded_fields,
74
77
  exclude_none=True,
75
78
  )
76
- # override the default output from pydantic by calling `to_dict()` of each item in relations (list)
77
- _items = []
78
- if self.relations:
79
- for _item in self.relations:
80
- if _item:
81
- _items.append(_item.to_dict())
82
- _dict['relations'] = _items
79
+ # override the default output from pydantic by calling `to_dict()` of x_csr_params
80
+ if self.x_csr_params:
81
+ _dict['x_csr_params'] = self.x_csr_params.to_dict()
83
82
  # override the default output from pydantic by calling `to_dict()` of each item in properties (list)
84
83
  _items = []
85
84
  if self.properties:
86
- for _item in self.properties:
87
- if _item:
88
- _items.append(_item.to_dict())
85
+ for _item_properties in self.properties:
86
+ if _item_properties:
87
+ _items.append(_item_properties.to_dict())
89
88
  _dict['properties'] = _items
90
89
  return _dict
91
90
 
92
91
  @classmethod
93
92
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
94
- """Create an instance of GrootEdgeType from a dict"""
93
+ """Create an instance of GetVertexType from a dict"""
95
94
  if obj is None:
96
95
  return None
97
96
 
@@ -99,9 +98,12 @@ class GrootEdgeType(BaseModel):
99
98
  return cls.model_validate(obj)
100
99
 
101
100
  _obj = cls.model_validate({
102
- "label": obj.get("label"),
103
- "relations": [GrootEdgeTypeRelationsInner.from_dict(_item) for _item in obj["relations"]] if obj.get("relations") is not None else None,
104
- "properties": [GrootProperty.from_dict(_item) for _item in obj["properties"]] if obj.get("properties") is not None else None
101
+ "type_name": obj.get("type_name"),
102
+ "primary_keys": obj.get("primary_keys"),
103
+ "x_csr_params": BaseVertexTypeXCsrParams.from_dict(obj["x_csr_params"]) if obj.get("x_csr_params") is not None else None,
104
+ "type_id": obj.get("type_id"),
105
+ "properties": [GetPropertyMeta.from_dict(_item) for _item in obj["properties"]] if obj.get("properties") is not None else None,
106
+ "description": obj.get("description")
105
107
  })
106
108
  return _obj
107
109
 
@@ -0,0 +1,152 @@
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 json
18
+ import pprint
19
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
20
+ from typing import Any, List, Optional
21
+ from graphscope.flex.rest.models.primitive_type import PrimitiveType
22
+ from graphscope.flex.rest.models.string_type import StringType
23
+ from graphscope.flex.rest.models.temporal_type import TemporalType
24
+ from pydantic import StrictStr, Field
25
+ from typing import Union, List, Set, Optional, Dict
26
+ from typing_extensions import Literal, Self
27
+
28
+ GSDATATYPE_ONE_OF_SCHEMAS = ["PrimitiveType", "StringType", "TemporalType"]
29
+
30
+ class GSDataType(BaseModel):
31
+ """
32
+ GSDataType
33
+ """
34
+ # data type: PrimitiveType
35
+ oneof_schema_1_validator: Optional[PrimitiveType] = None
36
+ # data type: StringType
37
+ oneof_schema_2_validator: Optional[StringType] = None
38
+ # data type: TemporalType
39
+ oneof_schema_3_validator: Optional[TemporalType] = None
40
+ actual_instance: Optional[Union[PrimitiveType, StringType, TemporalType]] = None
41
+ one_of_schemas: Set[str] = { "PrimitiveType", "StringType", "TemporalType" }
42
+
43
+ model_config = ConfigDict(
44
+ validate_assignment=True,
45
+ protected_namespaces=(),
46
+ )
47
+
48
+
49
+ def __init__(self, *args, **kwargs) -> None:
50
+ if args:
51
+ if len(args) > 1:
52
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
53
+ if kwargs:
54
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
55
+ super().__init__(actual_instance=args[0])
56
+ else:
57
+ super().__init__(**kwargs)
58
+
59
+ @field_validator('actual_instance')
60
+ def actual_instance_must_validate_oneof(cls, v):
61
+ instance = GSDataType.model_construct()
62
+ error_messages = []
63
+ match = 0
64
+ # validate data type: PrimitiveType
65
+ if not isinstance(v, PrimitiveType):
66
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PrimitiveType`")
67
+ else:
68
+ match += 1
69
+ # validate data type: StringType
70
+ if not isinstance(v, StringType):
71
+ error_messages.append(f"Error! Input type `{type(v)}` is not `StringType`")
72
+ else:
73
+ match += 1
74
+ # validate data type: TemporalType
75
+ if not isinstance(v, TemporalType):
76
+ error_messages.append(f"Error! Input type `{type(v)}` is not `TemporalType`")
77
+ else:
78
+ match += 1
79
+ if match > 1:
80
+ # more than 1 match
81
+ raise ValueError("Multiple matches found when setting `actual_instance` in GSDataType with oneOf schemas: PrimitiveType, StringType, TemporalType. Details: " + ", ".join(error_messages))
82
+ elif match == 0:
83
+ # no match
84
+ raise ValueError("No match found when setting `actual_instance` in GSDataType with oneOf schemas: PrimitiveType, StringType, TemporalType. Details: " + ", ".join(error_messages))
85
+ else:
86
+ return v
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
90
+ return cls.from_json(json.dumps(obj))
91
+
92
+ @classmethod
93
+ def from_json(cls, json_str: str) -> Self:
94
+ """Returns the object represented by the json string"""
95
+ instance = cls.model_construct()
96
+ error_messages = []
97
+ match = 0
98
+
99
+ # deserialize data into PrimitiveType
100
+ try:
101
+ instance.actual_instance = PrimitiveType.from_json(json_str)
102
+ match += 1
103
+ except (ValidationError, ValueError) as e:
104
+ error_messages.append(str(e))
105
+ # deserialize data into StringType
106
+ try:
107
+ instance.actual_instance = StringType.from_json(json_str)
108
+ match += 1
109
+ except (ValidationError, ValueError) as e:
110
+ error_messages.append(str(e))
111
+ # deserialize data into TemporalType
112
+ try:
113
+ instance.actual_instance = TemporalType.from_json(json_str)
114
+ match += 1
115
+ except (ValidationError, ValueError) as e:
116
+ error_messages.append(str(e))
117
+
118
+ if match > 1:
119
+ # more than 1 match
120
+ raise ValueError("Multiple matches found when deserializing the JSON string into GSDataType with oneOf schemas: PrimitiveType, StringType, TemporalType. Details: " + ", ".join(error_messages))
121
+ elif match == 0:
122
+ # no match
123
+ raise ValueError("No match found when deserializing the JSON string into GSDataType with oneOf schemas: PrimitiveType, StringType, TemporalType. Details: " + ", ".join(error_messages))
124
+ else:
125
+ return instance
126
+
127
+ def to_json(self) -> str:
128
+ """Returns the JSON representation of the actual instance"""
129
+ if self.actual_instance is None:
130
+ return "null"
131
+
132
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
133
+ return self.actual_instance.to_json()
134
+ else:
135
+ return json.dumps(self.actual_instance)
136
+
137
+ def to_dict(self) -> Optional[Union[Dict[str, Any], PrimitiveType, StringType, TemporalType]]:
138
+ """Returns the dict representation of the actual instance"""
139
+ if self.actual_instance is None:
140
+ return None
141
+
142
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
143
+ return self.actual_instance.to_dict()
144
+ else:
145
+ # primitive type
146
+ return self.actual_instance
147
+
148
+ def to_str(self) -> str:
149
+ """Returns the string representation of the actual instance"""
150
+ return pprint.pformat(self.model_dump())
151
+
152
+
@@ -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,7 +18,7 @@ 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
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
@@ -27,30 +27,27 @@ class JobStatus(BaseModel):
27
27
  """
28
28
  JobStatus
29
29
  """ # noqa: E501
30
- job_id: Optional[StrictStr] = None
31
- type: Optional[StrictStr] = None
32
- status: Optional[StrictStr] = None
30
+ id: StrictStr
31
+ type: StrictStr
32
+ status: StrictStr
33
33
  start_time: Optional[StrictStr] = None
34
34
  end_time: Optional[StrictStr] = None
35
- log: Optional[StrictStr] = Field(default=None, description="URL or log string")
35
+ log: Optional[StrictStr] = Field(default=None, description="logview URL or log string")
36
36
  detail: Optional[Dict[str, Any]] = None
37
- __properties: ClassVar[List[str]] = ["job_id", "type", "status", "start_time", "end_time", "log", "detail"]
37
+ __properties: ClassVar[List[str]] = ["id", "type", "status", "start_time", "end_time", "log", "detail"]
38
38
 
39
39
  @field_validator('status')
40
40
  def status_validate_enum(cls, value):
41
41
  """Validates the enum"""
42
- if value is None:
43
- return value
44
-
45
42
  if value not in set(['RUNNING', 'SUCCESS', 'FAILED', 'CANCELLED', 'WAITING']):
46
43
  raise ValueError("must be one of enum values ('RUNNING', 'SUCCESS', 'FAILED', 'CANCELLED', 'WAITING')")
47
44
  return value
48
45
 
49
- model_config = {
50
- "populate_by_name": True,
51
- "validate_assignment": True,
52
- "protected_namespaces": (),
53
- }
46
+ model_config = ConfigDict(
47
+ populate_by_name=True,
48
+ validate_assignment=True,
49
+ protected_namespaces=(),
50
+ )
54
51
 
55
52
 
56
53
  def to_str(self) -> str:
@@ -97,7 +94,7 @@ class JobStatus(BaseModel):
97
94
  return cls.model_validate(obj)
98
95
 
99
96
  _obj = cls.model_validate({
100
- "job_id": obj.get("job_id"),
97
+ "id": obj.get("id"),
101
98
  "type": obj.get("type"),
102
99
  "status": obj.get("status"),
103
100
  "start_time": obj.get("start_time"),
@@ -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,23 +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 Connection(BaseModel):
26
+ class LongText(BaseModel):
27
27
  """
28
- Connection
28
+ LongText
29
29
  """ # noqa: E501
30
- coordinator_endpoint: Optional[StrictStr] = None
31
- __properties: ClassVar[List[str]] = ["coordinator_endpoint"]
30
+ long_text: Optional[StrictStr]
31
+ __properties: ClassVar[List[str]] = ["long_text"]
32
32
 
33
- model_config = {
34
- "populate_by_name": True,
35
- "validate_assignment": True,
36
- "protected_namespaces": (),
37
- }
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
38
 
39
39
 
40
40
  def to_str(self) -> str:
@@ -48,7 +48,7 @@ class Connection(BaseModel):
48
48
 
49
49
  @classmethod
50
50
  def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of Connection from a JSON string"""
51
+ """Create an instance of LongText from a JSON string"""
52
52
  return cls.from_dict(json.loads(json_str))
53
53
 
54
54
  def to_dict(self) -> Dict[str, Any]:
@@ -69,11 +69,16 @@ class Connection(BaseModel):
69
69
  exclude=excluded_fields,
70
70
  exclude_none=True,
71
71
  )
72
+ # set to None if long_text (nullable) is None
73
+ # and model_fields_set contains the field
74
+ if self.long_text is None and "long_text" in self.model_fields_set:
75
+ _dict['long_text'] = None
76
+
72
77
  return _dict
73
78
 
74
79
  @classmethod
75
80
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of Connection from a dict"""
81
+ """Create an instance of LongText from a dict"""
77
82
  if obj is None:
78
83
  return None
79
84
 
@@ -81,7 +86,7 @@ class Connection(BaseModel):
81
86
  return cls.model_validate(obj)
82
87
 
83
88
  _obj = cls.model_validate({
84
- "coordinator_endpoint": obj.get("coordinator_endpoint")
89
+ "long_text": obj.get("long_text")
85
90
  })
86
91
  return _obj
87
92
 
@@ -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, StrictFloat, StrictInt, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional, Union
21
+ from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Union
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
@@ -27,17 +27,17 @@ class NodeStatus(BaseModel):
27
27
  """
28
28
  NodeStatus
29
29
  """ # noqa: E501
30
- node: Optional[StrictStr] = None
31
- cpu_usage: Optional[Union[StrictFloat, StrictInt]] = None
32
- memory_usage: Optional[Union[StrictFloat, StrictInt]] = None
33
- disk_usage: Optional[Union[StrictFloat, StrictInt]] = None
34
- __properties: ClassVar[List[str]] = ["node", "cpu_usage", "memory_usage", "disk_usage"]
30
+ name: StrictStr
31
+ cpu_usage: Union[StrictFloat, StrictInt]
32
+ memory_usage: Union[StrictFloat, StrictInt]
33
+ disk_usage: Union[StrictFloat, StrictInt]
34
+ __properties: ClassVar[List[str]] = ["name", "cpu_usage", "memory_usage", "disk_usage"]
35
35
 
36
- model_config = {
37
- "populate_by_name": True,
38
- "validate_assignment": True,
39
- "protected_namespaces": (),
40
- }
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
41
 
42
42
 
43
43
  def to_str(self) -> str:
@@ -84,7 +84,7 @@ class NodeStatus(BaseModel):
84
84
  return cls.model_validate(obj)
85
85
 
86
86
  _obj = cls.model_validate({
87
- "node": obj.get("node"),
87
+ "name": obj.get("name"),
88
88
  "cpu_usage": obj.get("cpu_usage"),
89
89
  "memory_usage": obj.get("memory_usage"),
90
90
  "disk_usage": obj.get("disk_usage")
@@ -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,25 @@ 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
+ from graphscope.flex.rest.models.gs_data_type import GSDataType
23
24
  from typing import Optional, Set
24
25
  from typing_extensions import Self
25
26
 
26
- class ProcedureParamsInner(BaseModel):
27
+ class Parameter(BaseModel):
27
28
  """
28
- ProcedureParamsInner
29
+ Parameter
29
30
  """ # noqa: E501
30
- name: Optional[StrictStr] = None
31
- type: Optional[StrictStr] = None
31
+ name: StrictStr
32
+ type: GSDataType
32
33
  __properties: ClassVar[List[str]] = ["name", "type"]
33
34
 
34
- model_config = {
35
- "populate_by_name": True,
36
- "validate_assignment": True,
37
- "protected_namespaces": (),
38
- }
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
39
40
 
40
41
 
41
42
  def to_str(self) -> str:
@@ -49,7 +50,7 @@ class ProcedureParamsInner(BaseModel):
49
50
 
50
51
  @classmethod
51
52
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of ProcedureParamsInner from a JSON string"""
53
+ """Create an instance of Parameter from a JSON string"""
53
54
  return cls.from_dict(json.loads(json_str))
54
55
 
55
56
  def to_dict(self) -> Dict[str, Any]:
@@ -70,11 +71,14 @@ class ProcedureParamsInner(BaseModel):
70
71
  exclude=excluded_fields,
71
72
  exclude_none=True,
72
73
  )
74
+ # override the default output from pydantic by calling `to_dict()` of type
75
+ if self.type:
76
+ _dict['type'] = self.type.to_dict()
73
77
  return _dict
74
78
 
75
79
  @classmethod
76
80
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
- """Create an instance of ProcedureParamsInner from a dict"""
81
+ """Create an instance of Parameter from a dict"""
78
82
  if obj is None:
79
83
  return None
80
84
 
@@ -83,7 +87,7 @@ class ProcedureParamsInner(BaseModel):
83
87
 
84
88
  _obj = cls.model_validate({
85
89
  "name": obj.get("name"),
86
- "type": obj.get("type")
90
+ "type": GSDataType.from_dict(obj["type"]) if obj.get("type") is not None else None
87
91
  })
88
92
  return _obj
89
93
 
@@ -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,26 +18,33 @@ 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, StrictInt, 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 DeploymentInfoGraphsInfoValue(BaseModel):
26
+ class PodStatus(BaseModel):
27
27
  """
28
- DeploymentInfoGraphsInfoValue
28
+ PodStatus
29
29
  """ # noqa: E501
30
- name: Optional[StrictStr] = None
31
- creation_time: Optional[StrictStr] = None
32
- update_time: Optional[StrictStr] = None
33
- last_dataloading_time: Optional[StrictStr] = None
34
- __properties: ClassVar[List[str]] = ["name", "creation_time", "update_time", "last_dataloading_time"]
35
-
36
- model_config = {
37
- "populate_by_name": True,
38
- "validate_assignment": True,
39
- "protected_namespaces": (),
40
- }
30
+ name: StrictStr
31
+ image: List[StrictStr]
32
+ labels: Dict[str, Any]
33
+ node: StrictStr
34
+ status: StrictStr
35
+ restart_count: StrictInt
36
+ cpu_usage: StrictInt
37
+ memory_usage: StrictInt
38
+ timestamp: Optional[StrictStr] = None
39
+ creation_time: StrictStr
40
+ component_belong_to: Optional[StrictStr] = None
41
+ __properties: ClassVar[List[str]] = ["name", "image", "labels", "node", "status", "restart_count", "cpu_usage", "memory_usage", "timestamp", "creation_time", "component_belong_to"]
42
+
43
+ model_config = ConfigDict(
44
+ populate_by_name=True,
45
+ validate_assignment=True,
46
+ protected_namespaces=(),
47
+ )
41
48
 
42
49
 
43
50
  def to_str(self) -> str:
@@ -51,7 +58,7 @@ class DeploymentInfoGraphsInfoValue(BaseModel):
51
58
 
52
59
  @classmethod
53
60
  def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of DeploymentInfoGraphsInfoValue from a JSON string"""
61
+ """Create an instance of PodStatus from a JSON string"""
55
62
  return cls.from_dict(json.loads(json_str))
56
63
 
57
64
  def to_dict(self) -> Dict[str, Any]:
@@ -76,7 +83,7 @@ class DeploymentInfoGraphsInfoValue(BaseModel):
76
83
 
77
84
  @classmethod
78
85
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
- """Create an instance of DeploymentInfoGraphsInfoValue from a dict"""
86
+ """Create an instance of PodStatus from a dict"""
80
87
  if obj is None:
81
88
  return None
82
89
 
@@ -85,9 +92,16 @@ class DeploymentInfoGraphsInfoValue(BaseModel):
85
92
 
86
93
  _obj = cls.model_validate({
87
94
  "name": obj.get("name"),
95
+ "image": obj.get("image"),
96
+ "labels": obj.get("labels"),
97
+ "node": obj.get("node"),
98
+ "status": obj.get("status"),
99
+ "restart_count": obj.get("restart_count"),
100
+ "cpu_usage": obj.get("cpu_usage"),
101
+ "memory_usage": obj.get("memory_usage"),
102
+ "timestamp": obj.get("timestamp"),
88
103
  "creation_time": obj.get("creation_time"),
89
- "update_time": obj.get("update_time"),
90
- "last_dataloading_time": obj.get("last_dataloading_time")
104
+ "component_belong_to": obj.get("component_belong_to")
91
105
  })
92
106
  return _obj
93
107