graphscope-flex 0.27.0__3-py2.py3-none-any.whl → 0.28.0__3-py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/METADATA +6 -4
  2. graphscope_flex-0.28.0.dist-info/RECORD +11 -0
  3. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/WHEEL +1 -1
  4. graphscope/flex/rest/api/__init__.py +0 -12
  5. graphscope/flex/rest/api/alert_api.py +0 -2780
  6. graphscope/flex/rest/api/data_source_api.py +0 -1173
  7. graphscope/flex/rest/api/deployment_api.py +0 -528
  8. graphscope/flex/rest/api/graph_api.py +0 -2803
  9. graphscope/flex/rest/api/job_api.py +0 -1356
  10. graphscope/flex/rest/api/service_api.py +0 -1311
  11. graphscope/flex/rest/api/stored_procedure_api.py +0 -1449
  12. graphscope/flex/rest/api/utils_api.py +0 -309
  13. graphscope/flex/rest/models/__init__.py +0 -73
  14. graphscope/flex/rest/models/base_edge_type.py +0 -102
  15. graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner.py +0 -105
  16. graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner_x_csr_params.py +0 -98
  17. graphscope/flex/rest/models/base_property_meta.py +0 -105
  18. graphscope/flex/rest/models/base_vertex_type.py +0 -96
  19. graphscope/flex/rest/models/base_vertex_type_x_csr_params.py +0 -88
  20. graphscope/flex/rest/models/column_mapping.py +0 -94
  21. graphscope/flex/rest/models/column_mapping_column.py +0 -90
  22. graphscope/flex/rest/models/create_alert_receiver_request.py +0 -103
  23. graphscope/flex/rest/models/create_alert_rule_request.py +0 -112
  24. graphscope/flex/rest/models/create_dataloading_job_response.py +0 -88
  25. graphscope/flex/rest/models/create_edge_type.py +0 -114
  26. graphscope/flex/rest/models/create_graph_request.py +0 -106
  27. graphscope/flex/rest/models/create_graph_response.py +0 -88
  28. graphscope/flex/rest/models/create_graph_schema_request.py +0 -106
  29. graphscope/flex/rest/models/create_property_meta.py +0 -100
  30. graphscope/flex/rest/models/create_stored_proc_request.py +0 -101
  31. graphscope/flex/rest/models/create_stored_proc_response.py +0 -88
  32. graphscope/flex/rest/models/create_vertex_type.py +0 -108
  33. graphscope/flex/rest/models/dataloading_job_config.py +0 -136
  34. graphscope/flex/rest/models/dataloading_job_config_edges_inner.py +0 -92
  35. graphscope/flex/rest/models/dataloading_job_config_loading_config.py +0 -104
  36. graphscope/flex/rest/models/dataloading_job_config_loading_config_format.py +0 -90
  37. graphscope/flex/rest/models/dataloading_job_config_vertices_inner.py +0 -88
  38. graphscope/flex/rest/models/edge_mapping.py +0 -122
  39. graphscope/flex/rest/models/edge_mapping_type_triplet.py +0 -92
  40. graphscope/flex/rest/models/error.py +0 -90
  41. graphscope/flex/rest/models/get_alert_message_response.py +0 -123
  42. graphscope/flex/rest/models/get_alert_receiver_response.py +0 -107
  43. graphscope/flex/rest/models/get_alert_rule_response.py +0 -114
  44. graphscope/flex/rest/models/get_edge_type.py +0 -116
  45. graphscope/flex/rest/models/get_graph_response.py +0 -126
  46. graphscope/flex/rest/models/get_graph_schema_response.py +0 -106
  47. graphscope/flex/rest/models/get_property_meta.py +0 -102
  48. graphscope/flex/rest/models/get_stored_proc_response.py +0 -128
  49. graphscope/flex/rest/models/get_vertex_type.py +0 -110
  50. graphscope/flex/rest/models/gs_data_type.py +0 -138
  51. graphscope/flex/rest/models/job_status.py +0 -107
  52. graphscope/flex/rest/models/long_text.py +0 -93
  53. graphscope/flex/rest/models/node_status.py +0 -94
  54. graphscope/flex/rest/models/parameter.py +0 -94
  55. graphscope/flex/rest/models/primitive_type.py +0 -95
  56. graphscope/flex/rest/models/running_deployment_info.py +0 -128
  57. graphscope/flex/rest/models/running_deployment_status.py +0 -105
  58. graphscope/flex/rest/models/running_deployment_status_nodes_inner.py +0 -124
  59. graphscope/flex/rest/models/schema_mapping.py +0 -106
  60. graphscope/flex/rest/models/service_status.py +0 -105
  61. graphscope/flex/rest/models/service_status_sdk_endpoints.py +0 -94
  62. graphscope/flex/rest/models/start_service_request.py +0 -88
  63. graphscope/flex/rest/models/stored_procedure_meta.py +0 -124
  64. graphscope/flex/rest/models/string_type.py +0 -92
  65. graphscope/flex/rest/models/string_type_string.py +0 -124
  66. graphscope/flex/rest/models/update_alert_message_status_request.py +0 -97
  67. graphscope/flex/rest/models/update_stored_proc_request.py +0 -88
  68. graphscope/flex/rest/models/upload_file_response.py +0 -88
  69. graphscope/flex/rest/models/vertex_mapping.py +0 -100
  70. graphscope_flex-0.27.0.dist-info/RECORD +0 -77
  71. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/top_level.txt +0 -0
@@ -1,309 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- GraphScope FLEX HTTP SERVICE API
5
-
6
- This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Contact: graphscope@alibaba-inc.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
- import warnings
16
- from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
- from typing import Any, Dict, List, Optional, Tuple, Union
18
- from typing_extensions import Annotated
19
-
20
- from pydantic import StrictBytes, StrictStr
21
- from typing import Optional, Union
22
- from graphscope.flex.rest.models.upload_file_response import UploadFileResponse
23
-
24
- from graphscope.flex.rest.api_client import ApiClient, RequestSerialized
25
- from graphscope.flex.rest.api_response import ApiResponse
26
- from graphscope.flex.rest.rest import RESTResponseType
27
-
28
-
29
- class UtilsApi:
30
- """NOTE: This class is auto generated by OpenAPI Generator
31
- Ref: https://openapi-generator.tech
32
-
33
- Do not edit the class manually.
34
- """
35
-
36
- def __init__(self, api_client=None) -> None:
37
- if api_client is None:
38
- api_client = ApiClient.get_default()
39
- self.api_client = api_client
40
-
41
-
42
- @validate_call
43
- def upload_file(
44
- self,
45
- filestorage: Optional[Union[StrictBytes, StrictStr]] = None,
46
- _request_timeout: Union[
47
- None,
48
- Annotated[StrictFloat, Field(gt=0)],
49
- Tuple[
50
- Annotated[StrictFloat, Field(gt=0)],
51
- Annotated[StrictFloat, Field(gt=0)]
52
- ]
53
- ] = None,
54
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
55
- _content_type: Optional[StrictStr] = None,
56
- _headers: Optional[Dict[StrictStr, Any]] = None,
57
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
58
- ) -> UploadFileResponse:
59
- """upload_file
60
-
61
-
62
- :param filestorage:
63
- :type filestorage: bytearray
64
- :param _request_timeout: timeout setting for this request. If one
65
- number provided, it will be total request
66
- timeout. It can also be a pair (tuple) of
67
- (connection, read) timeouts.
68
- :type _request_timeout: int, tuple(int, int), optional
69
- :param _request_auth: set to override the auth_settings for an a single
70
- request; this effectively ignores the
71
- authentication in the spec for a single request.
72
- :type _request_auth: dict, optional
73
- :param _content_type: force content-type for the request.
74
- :type _content_type: str, Optional
75
- :param _headers: set to override the headers for a single
76
- request; this effectively ignores the headers
77
- in the spec for a single request.
78
- :type _headers: dict, optional
79
- :param _host_index: set to override the host_index for a single
80
- request; this effectively ignores the host_index
81
- in the spec for a single request.
82
- :type _host_index: int, optional
83
- :return: Returns the result object.
84
- """ # noqa: E501
85
-
86
- _param = self._upload_file_serialize(
87
- filestorage=filestorage,
88
- _request_auth=_request_auth,
89
- _content_type=_content_type,
90
- _headers=_headers,
91
- _host_index=_host_index
92
- )
93
-
94
- _response_types_map: Dict[str, Optional[str]] = {
95
- '200': "UploadFileResponse",
96
- '500': "Error",
97
- }
98
- response_data = self.api_client.call_api(
99
- *_param,
100
- _request_timeout=_request_timeout
101
- )
102
- response_data.read()
103
- return self.api_client.response_deserialize(
104
- response_data=response_data,
105
- response_types_map=_response_types_map,
106
- ).data
107
-
108
-
109
- @validate_call
110
- def upload_file_with_http_info(
111
- self,
112
- filestorage: Optional[Union[StrictBytes, StrictStr]] = None,
113
- _request_timeout: Union[
114
- None,
115
- Annotated[StrictFloat, Field(gt=0)],
116
- Tuple[
117
- Annotated[StrictFloat, Field(gt=0)],
118
- Annotated[StrictFloat, Field(gt=0)]
119
- ]
120
- ] = None,
121
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
122
- _content_type: Optional[StrictStr] = None,
123
- _headers: Optional[Dict[StrictStr, Any]] = None,
124
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
125
- ) -> ApiResponse[UploadFileResponse]:
126
- """upload_file
127
-
128
-
129
- :param filestorage:
130
- :type filestorage: bytearray
131
- :param _request_timeout: timeout setting for this request. If one
132
- number provided, it will be total request
133
- timeout. It can also be a pair (tuple) of
134
- (connection, read) timeouts.
135
- :type _request_timeout: int, tuple(int, int), optional
136
- :param _request_auth: set to override the auth_settings for an a single
137
- request; this effectively ignores the
138
- authentication in the spec for a single request.
139
- :type _request_auth: dict, optional
140
- :param _content_type: force content-type for the request.
141
- :type _content_type: str, Optional
142
- :param _headers: set to override the headers for a single
143
- request; this effectively ignores the headers
144
- in the spec for a single request.
145
- :type _headers: dict, optional
146
- :param _host_index: set to override the host_index for a single
147
- request; this effectively ignores the host_index
148
- in the spec for a single request.
149
- :type _host_index: int, optional
150
- :return: Returns the result object.
151
- """ # noqa: E501
152
-
153
- _param = self._upload_file_serialize(
154
- filestorage=filestorage,
155
- _request_auth=_request_auth,
156
- _content_type=_content_type,
157
- _headers=_headers,
158
- _host_index=_host_index
159
- )
160
-
161
- _response_types_map: Dict[str, Optional[str]] = {
162
- '200': "UploadFileResponse",
163
- '500': "Error",
164
- }
165
- response_data = self.api_client.call_api(
166
- *_param,
167
- _request_timeout=_request_timeout
168
- )
169
- response_data.read()
170
- return self.api_client.response_deserialize(
171
- response_data=response_data,
172
- response_types_map=_response_types_map,
173
- )
174
-
175
-
176
- @validate_call
177
- def upload_file_without_preload_content(
178
- self,
179
- filestorage: Optional[Union[StrictBytes, StrictStr]] = None,
180
- _request_timeout: Union[
181
- None,
182
- Annotated[StrictFloat, Field(gt=0)],
183
- Tuple[
184
- Annotated[StrictFloat, Field(gt=0)],
185
- Annotated[StrictFloat, Field(gt=0)]
186
- ]
187
- ] = None,
188
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
189
- _content_type: Optional[StrictStr] = None,
190
- _headers: Optional[Dict[StrictStr, Any]] = None,
191
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
192
- ) -> RESTResponseType:
193
- """upload_file
194
-
195
-
196
- :param filestorage:
197
- :type filestorage: bytearray
198
- :param _request_timeout: timeout setting for this request. If one
199
- number provided, it will be total request
200
- timeout. It can also be a pair (tuple) of
201
- (connection, read) timeouts.
202
- :type _request_timeout: int, tuple(int, int), optional
203
- :param _request_auth: set to override the auth_settings for an a single
204
- request; this effectively ignores the
205
- authentication in the spec for a single request.
206
- :type _request_auth: dict, optional
207
- :param _content_type: force content-type for the request.
208
- :type _content_type: str, Optional
209
- :param _headers: set to override the headers for a single
210
- request; this effectively ignores the headers
211
- in the spec for a single request.
212
- :type _headers: dict, optional
213
- :param _host_index: set to override the host_index for a single
214
- request; this effectively ignores the host_index
215
- in the spec for a single request.
216
- :type _host_index: int, optional
217
- :return: Returns the result object.
218
- """ # noqa: E501
219
-
220
- _param = self._upload_file_serialize(
221
- filestorage=filestorage,
222
- _request_auth=_request_auth,
223
- _content_type=_content_type,
224
- _headers=_headers,
225
- _host_index=_host_index
226
- )
227
-
228
- _response_types_map: Dict[str, Optional[str]] = {
229
- '200': "UploadFileResponse",
230
- '500': "Error",
231
- }
232
- response_data = self.api_client.call_api(
233
- *_param,
234
- _request_timeout=_request_timeout
235
- )
236
- return response_data.response
237
-
238
-
239
- def _upload_file_serialize(
240
- self,
241
- filestorage,
242
- _request_auth,
243
- _content_type,
244
- _headers,
245
- _host_index,
246
- ) -> RequestSerialized:
247
-
248
- _host = None
249
-
250
- _collection_formats: Dict[str, str] = {
251
- }
252
-
253
- _path_params: Dict[str, str] = {}
254
- _query_params: List[Tuple[str, str]] = []
255
- _header_params: Dict[str, Optional[str]] = _headers or {}
256
- _form_params: List[Tuple[str, str]] = []
257
- _files: Dict[str, str] = {}
258
- _body_params: Optional[bytes] = None
259
-
260
- # process the path parameters
261
- # process the query parameters
262
- # process the header parameters
263
- # process the form parameters
264
- if filestorage is not None:
265
- _files['filestorage'] = filestorage
266
- # process the body parameter
267
-
268
-
269
- # set the HTTP header `Accept`
270
- _header_params['Accept'] = self.api_client.select_header_accept(
271
- [
272
- 'application/json'
273
- ]
274
- )
275
-
276
- # set the HTTP header `Content-Type`
277
- if _content_type:
278
- _header_params['Content-Type'] = _content_type
279
- else:
280
- _default_content_type = (
281
- self.api_client.select_header_content_type(
282
- [
283
- 'multipart/form-data'
284
- ]
285
- )
286
- )
287
- if _default_content_type is not None:
288
- _header_params['Content-Type'] = _default_content_type
289
-
290
- # authentication setting
291
- _auth_settings: List[str] = [
292
- ]
293
-
294
- return self.api_client.param_serialize(
295
- method='POST',
296
- resource_path='/api/v1/file/uploading',
297
- path_params=_path_params,
298
- query_params=_query_params,
299
- header_params=_header_params,
300
- body=_body_params,
301
- post_params=_form_params,
302
- files=_files,
303
- auth_settings=_auth_settings,
304
- collection_formats=_collection_formats,
305
- _host=_host,
306
- _request_auth=_request_auth
307
- )
308
-
309
-
@@ -1,73 +0,0 @@
1
- # coding: utf-8
2
-
3
- # flake8: noqa
4
- """
5
- GraphScope FLEX HTTP SERVICE API
6
-
7
- 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)
8
-
9
- The version of the OpenAPI document: 1.0.0
10
- Contact: graphscope@alibaba-inc.com
11
- Generated by OpenAPI Generator (https://openapi-generator.tech)
12
-
13
- Do not edit the class manually.
14
- """ # noqa: E501
15
-
16
-
17
- # import models into model package
18
- from graphscope.flex.rest.models.base_edge_type import BaseEdgeType
19
- from graphscope.flex.rest.models.base_edge_type_vertex_type_pair_relations_inner import BaseEdgeTypeVertexTypePairRelationsInner
20
- from graphscope.flex.rest.models.base_edge_type_vertex_type_pair_relations_inner_x_csr_params import BaseEdgeTypeVertexTypePairRelationsInnerXCsrParams
21
- from graphscope.flex.rest.models.base_property_meta import BasePropertyMeta
22
- from graphscope.flex.rest.models.base_vertex_type import BaseVertexType
23
- from graphscope.flex.rest.models.base_vertex_type_x_csr_params import BaseVertexTypeXCsrParams
24
- from graphscope.flex.rest.models.column_mapping import ColumnMapping
25
- from graphscope.flex.rest.models.column_mapping_column import ColumnMappingColumn
26
- from graphscope.flex.rest.models.create_alert_receiver_request import CreateAlertReceiverRequest
27
- from graphscope.flex.rest.models.create_alert_rule_request import CreateAlertRuleRequest
28
- from graphscope.flex.rest.models.create_dataloading_job_response import CreateDataloadingJobResponse
29
- from graphscope.flex.rest.models.create_edge_type import CreateEdgeType
30
- from graphscope.flex.rest.models.create_graph_request import CreateGraphRequest
31
- from graphscope.flex.rest.models.create_graph_response import CreateGraphResponse
32
- from graphscope.flex.rest.models.create_graph_schema_request import CreateGraphSchemaRequest
33
- from graphscope.flex.rest.models.create_property_meta import CreatePropertyMeta
34
- from graphscope.flex.rest.models.create_stored_proc_request import CreateStoredProcRequest
35
- from graphscope.flex.rest.models.create_stored_proc_response import CreateStoredProcResponse
36
- from graphscope.flex.rest.models.create_vertex_type import CreateVertexType
37
- from graphscope.flex.rest.models.dataloading_job_config import DataloadingJobConfig
38
- from graphscope.flex.rest.models.dataloading_job_config_edges_inner import DataloadingJobConfigEdgesInner
39
- from graphscope.flex.rest.models.dataloading_job_config_loading_config import DataloadingJobConfigLoadingConfig
40
- from graphscope.flex.rest.models.dataloading_job_config_loading_config_format import DataloadingJobConfigLoadingConfigFormat
41
- from graphscope.flex.rest.models.dataloading_job_config_vertices_inner import DataloadingJobConfigVerticesInner
42
- from graphscope.flex.rest.models.edge_mapping import EdgeMapping
43
- from graphscope.flex.rest.models.edge_mapping_type_triplet import EdgeMappingTypeTriplet
44
- from graphscope.flex.rest.models.error import Error
45
- from graphscope.flex.rest.models.gs_data_type import GSDataType
46
- from graphscope.flex.rest.models.get_alert_message_response import GetAlertMessageResponse
47
- from graphscope.flex.rest.models.get_alert_receiver_response import GetAlertReceiverResponse
48
- from graphscope.flex.rest.models.get_alert_rule_response import GetAlertRuleResponse
49
- from graphscope.flex.rest.models.get_edge_type import GetEdgeType
50
- from graphscope.flex.rest.models.get_graph_response import GetGraphResponse
51
- from graphscope.flex.rest.models.get_graph_schema_response import GetGraphSchemaResponse
52
- from graphscope.flex.rest.models.get_property_meta import GetPropertyMeta
53
- from graphscope.flex.rest.models.get_stored_proc_response import GetStoredProcResponse
54
- from graphscope.flex.rest.models.get_vertex_type import GetVertexType
55
- from graphscope.flex.rest.models.job_status import JobStatus
56
- from graphscope.flex.rest.models.long_text import LongText
57
- from graphscope.flex.rest.models.node_status import NodeStatus
58
- from graphscope.flex.rest.models.parameter import Parameter
59
- from graphscope.flex.rest.models.primitive_type import PrimitiveType
60
- from graphscope.flex.rest.models.running_deployment_info import RunningDeploymentInfo
61
- from graphscope.flex.rest.models.running_deployment_status import RunningDeploymentStatus
62
- from graphscope.flex.rest.models.running_deployment_status_nodes_inner import RunningDeploymentStatusNodesInner
63
- from graphscope.flex.rest.models.schema_mapping import SchemaMapping
64
- from graphscope.flex.rest.models.service_status import ServiceStatus
65
- from graphscope.flex.rest.models.service_status_sdk_endpoints import ServiceStatusSdkEndpoints
66
- from graphscope.flex.rest.models.start_service_request import StartServiceRequest
67
- from graphscope.flex.rest.models.stored_procedure_meta import StoredProcedureMeta
68
- from graphscope.flex.rest.models.string_type import StringType
69
- from graphscope.flex.rest.models.string_type_string import StringTypeString
70
- from graphscope.flex.rest.models.update_alert_message_status_request import UpdateAlertMessageStatusRequest
71
- from graphscope.flex.rest.models.update_stored_proc_request import UpdateStoredProcRequest
72
- from graphscope.flex.rest.models.upload_file_response import UploadFileResponse
73
- from graphscope.flex.rest.models.vertex_mapping import VertexMapping
@@ -1,102 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- GraphScope FLEX HTTP SERVICE API
5
-
6
- This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Contact: graphscope@alibaba-inc.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, StrictBool, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from graphscope.flex.rest.models.base_edge_type_vertex_type_pair_relations_inner import BaseEdgeTypeVertexTypePairRelationsInner
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class BaseEdgeType(BaseModel):
28
- """
29
- BaseEdgeType
30
- """ # noqa: E501
31
- type_name: StrictStr
32
- vertex_type_pair_relations: List[BaseEdgeTypeVertexTypePairRelationsInner]
33
- directed: Optional[StrictBool] = None
34
- primary_keys: Optional[List[StrictStr]] = None
35
- __properties: ClassVar[List[str]] = ["type_name", "vertex_type_pair_relations", "directed", "primary_keys"]
36
-
37
- model_config = {
38
- "populate_by_name": True,
39
- "validate_assignment": True,
40
- "protected_namespaces": (),
41
- }
42
-
43
-
44
- def to_str(self) -> str:
45
- """Returns the string representation of the model using alias"""
46
- return pprint.pformat(self.model_dump(by_alias=True))
47
-
48
- def to_json(self) -> str:
49
- """Returns the JSON representation of the model using alias"""
50
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
- return json.dumps(self.to_dict())
52
-
53
- @classmethod
54
- def from_json(cls, json_str: str) -> Optional[Self]:
55
- """Create an instance of BaseEdgeType from a JSON string"""
56
- return cls.from_dict(json.loads(json_str))
57
-
58
- def to_dict(self) -> Dict[str, Any]:
59
- """Return the dictionary representation of the model using alias.
60
-
61
- This has the following differences from calling pydantic's
62
- `self.model_dump(by_alias=True)`:
63
-
64
- * `None` is only added to the output dict for nullable fields that
65
- were set at model initialization. Other fields with value `None`
66
- are ignored.
67
- """
68
- excluded_fields: Set[str] = set([
69
- ])
70
-
71
- _dict = self.model_dump(
72
- by_alias=True,
73
- exclude=excluded_fields,
74
- exclude_none=True,
75
- )
76
- # override the default output from pydantic by calling `to_dict()` of each item in vertex_type_pair_relations (list)
77
- _items = []
78
- if self.vertex_type_pair_relations:
79
- for _item in self.vertex_type_pair_relations:
80
- if _item:
81
- _items.append(_item.to_dict())
82
- _dict['vertex_type_pair_relations'] = _items
83
- return _dict
84
-
85
- @classmethod
86
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
- """Create an instance of BaseEdgeType from a dict"""
88
- if obj is None:
89
- return None
90
-
91
- if not isinstance(obj, dict):
92
- return cls.model_validate(obj)
93
-
94
- _obj = cls.model_validate({
95
- "type_name": obj.get("type_name"),
96
- "vertex_type_pair_relations": [BaseEdgeTypeVertexTypePairRelationsInner.from_dict(_item) for _item in obj["vertex_type_pair_relations"]] if obj.get("vertex_type_pair_relations") is not None else None,
97
- "directed": obj.get("directed"),
98
- "primary_keys": obj.get("primary_keys")
99
- })
100
- return _obj
101
-
102
-
@@ -1,105 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- GraphScope FLEX HTTP SERVICE API
5
-
6
- This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Contact: graphscope@alibaba-inc.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, StrictStr, field_validator
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from graphscope.flex.rest.models.base_edge_type_vertex_type_pair_relations_inner_x_csr_params import BaseEdgeTypeVertexTypePairRelationsInnerXCsrParams
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class BaseEdgeTypeVertexTypePairRelationsInner(BaseModel):
28
- """
29
- BaseEdgeTypeVertexTypePairRelationsInner
30
- """ # noqa: E501
31
- source_vertex: StrictStr
32
- destination_vertex: StrictStr
33
- relation: StrictStr
34
- x_csr_params: Optional[BaseEdgeTypeVertexTypePairRelationsInnerXCsrParams] = None
35
- __properties: ClassVar[List[str]] = ["source_vertex", "destination_vertex", "relation", "x_csr_params"]
36
-
37
- @field_validator('relation')
38
- def relation_validate_enum(cls, value):
39
- """Validates the enum"""
40
- if value not in set(['MANY_TO_MANY', 'ONE_TO_MANY', 'MANY_TO_ONE', 'ONE_TO_ONE']):
41
- raise ValueError("must be one of enum values ('MANY_TO_MANY', 'ONE_TO_MANY', 'MANY_TO_ONE', 'ONE_TO_ONE')")
42
- return value
43
-
44
- model_config = {
45
- "populate_by_name": True,
46
- "validate_assignment": True,
47
- "protected_namespaces": (),
48
- }
49
-
50
-
51
- def to_str(self) -> str:
52
- """Returns the string representation of the model using alias"""
53
- return pprint.pformat(self.model_dump(by_alias=True))
54
-
55
- def to_json(self) -> str:
56
- """Returns the JSON representation of the model using alias"""
57
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
58
- return json.dumps(self.to_dict())
59
-
60
- @classmethod
61
- def from_json(cls, json_str: str) -> Optional[Self]:
62
- """Create an instance of BaseEdgeTypeVertexTypePairRelationsInner from a JSON string"""
63
- return cls.from_dict(json.loads(json_str))
64
-
65
- def to_dict(self) -> Dict[str, Any]:
66
- """Return the dictionary representation of the model using alias.
67
-
68
- This has the following differences from calling pydantic's
69
- `self.model_dump(by_alias=True)`:
70
-
71
- * `None` is only added to the output dict for nullable fields that
72
- were set at model initialization. Other fields with value `None`
73
- are ignored.
74
- """
75
- excluded_fields: Set[str] = set([
76
- ])
77
-
78
- _dict = self.model_dump(
79
- by_alias=True,
80
- exclude=excluded_fields,
81
- exclude_none=True,
82
- )
83
- # override the default output from pydantic by calling `to_dict()` of x_csr_params
84
- if self.x_csr_params:
85
- _dict['x_csr_params'] = self.x_csr_params.to_dict()
86
- return _dict
87
-
88
- @classmethod
89
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
- """Create an instance of BaseEdgeTypeVertexTypePairRelationsInner from a dict"""
91
- if obj is None:
92
- return None
93
-
94
- if not isinstance(obj, dict):
95
- return cls.model_validate(obj)
96
-
97
- _obj = cls.model_validate({
98
- "source_vertex": obj.get("source_vertex"),
99
- "destination_vertex": obj.get("destination_vertex"),
100
- "relation": obj.get("relation"),
101
- "x_csr_params": BaseEdgeTypeVertexTypePairRelationsInnerXCsrParams.from_dict(obj["x_csr_params"]) if obj.get("x_csr_params") is not None else None
102
- })
103
- return _obj
104
-
105
-
@@ -1,98 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- GraphScope FLEX HTTP SERVICE API
5
-
6
- This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Contact: graphscope@alibaba-inc.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, StrictStr, 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 BaseEdgeTypeVertexTypePairRelationsInnerXCsrParams(BaseModel):
27
- """
28
- Used for storage optimization
29
- """ # noqa: E501
30
- edge_storage_strategy: Optional[StrictStr] = None
31
- __properties: ClassVar[List[str]] = ["edge_storage_strategy"]
32
-
33
- @field_validator('edge_storage_strategy')
34
- def edge_storage_strategy_validate_enum(cls, value):
35
- """Validates the enum"""
36
- if value is None:
37
- return value
38
-
39
- if value not in set(['ONLY_IN', 'ONLY_OUT', 'BOTH_OUT_IN']):
40
- raise ValueError("must be one of enum values ('ONLY_IN', 'ONLY_OUT', 'BOTH_OUT_IN')")
41
- return value
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 BaseEdgeTypeVertexTypePairRelationsInnerXCsrParams 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 BaseEdgeTypeVertexTypePairRelationsInnerXCsrParams 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
- "edge_storage_strategy": obj.get("edge_storage_strategy")
95
- })
96
- return _obj
97
-
98
-