@darabonba/python-generator 2.0.8 → 2.0.10
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.
- package/ChangeLog.md +3 -0
- package/lib/builtin.js +12 -3
- package/lib/generator.js +238 -239
- package/lib/helper.js +237 -5
- package/package.json +1 -1
- package/tests/expected/alias/setup.py +17 -13
- package/tests/expected/alias/tea_python_tests/client.py +6 -6
- package/tests/expected/annotation/tea_python_tests/client.py +4 -4
- package/tests/expected/annotation/tea_python_tests/models/__init__.py +0 -2
- package/tests/expected/annotation/tea_python_tests/models/_test.py +1 -1
- package/tests/expected/api/tea_python_tests/client.py +4 -4
- package/tests/expected/builtin/tea_python_tests/client.py +18 -16
- package/tests/expected/comment/tea_python_tests/client.py +6 -5
- package/tests/expected/comment/tea_python_tests/models/__init__.py +0 -2
- package/tests/expected/comment/tea_python_tests/models/_test_1.py +2 -1
- package/tests/expected/comment/tea_python_tests/models/_test_2.py +1 -1
- package/tests/expected/comment/tea_python_tests/models/_test_3.py +1 -1
- package/tests/expected/complex/tea_python_tests/client.py +17 -16
- package/tests/expected/complex/tea_python_tests/exceptions/__init__.py +0 -2
- package/tests/expected/complex/tea_python_tests/exceptions/_err_1.py +2 -1
- package/tests/expected/complex/tea_python_tests/exceptions/_err_2.py +1 -1
- package/tests/expected/complex/tea_python_tests/models/__init__.py +0 -2
- package/tests/expected/complex/tea_python_tests/models/_complex_request.py +7 -6
- package/tests/expected/complex/tea_python_tests/models/_response.py +2 -2
- package/tests/expected/const/tea_python_tests/client.py +0 -2
- package/tests/expected/empty/tea_python_tests/client.py +0 -2
- package/tests/expected/exec/tea_python_tests/exec_client.py +3 -2
- package/tests/expected/function/tea_python_tests/client.py +2 -1
- package/tests/expected/import/setup.py +4 -2
- package/tests/expected/import/tea_python_tests/client.py +4 -3
- package/tests/expected/map/tea_python_tests/client.py +3 -3
- package/tests/expected/model/tea_python_tests/client.py +0 -2
- package/tests/expected/model/tea_python_tests/exceptions/__init__.py +0 -2
- package/tests/expected/model/tea_python_tests/exceptions/_main_file.py +3 -2
- package/tests/expected/model/tea_python_tests/models/__init__.py +0 -2
- package/tests/expected/model/tea_python_tests/models/_class.py +1 -1
- package/tests/expected/model/tea_python_tests/models/_m.py +2 -2
- package/tests/expected/model/tea_python_tests/models/_main_file.py +2 -2
- package/tests/expected/model/tea_python_tests/models/_model.py +1 -1
- package/tests/expected/model/tea_python_tests/models/_my_model.py +13 -12
- package/tests/expected/modelConfig/tea_python_tests/client.py +0 -2
- package/tests/expected/modelConfig/tea_python_tests/exceptions/__init__.py +0 -2
- package/tests/expected/modelConfig/tea_python_tests/exceptions/_main_file.py +3 -2
- package/tests/expected/modelConfig/tea_python_tests/models/__init__.py +0 -2
- package/tests/expected/modelConfig/tea_python_tests/models/_class.py +1 -1
- package/tests/expected/modelConfig/tea_python_tests/models/_m.py +2 -2
- package/tests/expected/modelConfig/tea_python_tests/models/_main_file.py +2 -2
- package/tests/expected/modelConfig/tea_python_tests/models/_model.py +1 -1
- package/tests/expected/modelConfig/tea_python_tests/models/_my_model.py +13 -12
- package/tests/expected/multi/tea_python_tests/api.py +5 -5
- package/tests/expected/multi/tea_python_tests/api_models/__init__.py +0 -2
- package/tests/expected/multi/tea_python_tests/api_models/_test_model_dir_2.py +1 -1
- package/tests/expected/multi/tea_python_tests/client.py +4 -3
- package/tests/expected/multi/tea_python_tests/exceptions/__init__.py +0 -2
- package/tests/expected/multi/tea_python_tests/exceptions/_err.py +1 -1
- package/tests/expected/multi/tea_python_tests/lib/util.py +0 -1
- package/tests/expected/multi/tea_python_tests/model/user.py +3 -2
- package/tests/expected/multi/tea_python_tests/model/user_exceptions/__init__.py +0 -2
- package/tests/expected/multi/tea_python_tests/model/user_exceptions/_err.py +1 -1
- package/tests/expected/multi/tea_python_tests/model/user_exceptions/_err_1.py +1 -1
- package/tests/expected/multi/tea_python_tests/model/user_exceptions/_err_2.py +1 -1
- package/tests/expected/multi/tea_python_tests/model/user_models/__init__.py +0 -2
- package/tests/expected/multi/tea_python_tests/model/user_models/_base_info.py +1 -1
- package/tests/expected/multi/tea_python_tests/model/user_models/_info.py +1 -1
- package/tests/expected/multi/tea_python_tests/models/__init__.py +0 -2
- package/tests/expected/multi/tea_python_tests/models/_test_model_dir.py +3 -2
- package/tests/expected/statements/tea_python_tests/client.py +3 -3
- package/tests/expected/super/tea_python_tests/client.py +2 -2
- package/tests/expected/typedef/tea_python_tests/client.py +5 -5
- package/tests/expected/typedef/tea_python_tests/models/__init__.py +0 -2
- package/tests/expected/typedef/tea_python_tests/models/_m.py +3 -3
- package/tests/fixtures/alias/Darafile +5 -4
- package/tests/fixtures/complex/libraries/import.dara +11 -0
- package/tests/fixtures/complex/main.dara +2 -2
- package/tests/main.tests.js +26 -23
- package/tests/output/alias/setup.py +15 -11
- package/tests/output/alias/tea_python_tests/client.py +6 -6
- package/tests/output/annotation/setup.py +6 -4
- package/tests/output/annotation/tea_python_tests/client.py +4 -4
- package/tests/output/annotation/tea_python_tests/models/__init__.py +0 -2
- package/tests/output/annotation/tea_python_tests/models/_test.py +1 -1
- package/tests/output/api/setup.py +6 -4
- package/tests/output/api/tea_python_tests/client.py +4 -4
- package/tests/output/builtin/setup.py +6 -4
- package/tests/output/builtin/tea_python_tests/client.py +18 -16
- package/tests/output/comment/setup.py +6 -4
- package/tests/output/comment/tea_python_tests/client.py +6 -5
- package/tests/output/comment/tea_python_tests/models/__init__.py +0 -2
- package/tests/output/comment/tea_python_tests/models/_test_1.py +2 -1
- package/tests/output/comment/tea_python_tests/models/_test_2.py +1 -1
- package/tests/output/comment/tea_python_tests/models/_test_3.py +1 -1
- package/tests/output/complex/setup.py +6 -4
- package/tests/output/complex/tea_python_tests/client.py +17 -16
- package/tests/output/complex/tea_python_tests/exceptions/__init__.py +0 -2
- package/tests/output/complex/tea_python_tests/exceptions/_err_1.py +2 -1
- package/tests/output/complex/tea_python_tests/exceptions/_err_2.py +1 -1
- package/tests/output/complex/tea_python_tests/models/__init__.py +0 -2
- package/tests/output/complex/tea_python_tests/models/_complex_request.py +7 -6
- package/tests/output/complex/tea_python_tests/models/_response.py +2 -2
- package/tests/output/const/setup.py +6 -4
- package/tests/output/const/tea_python_tests/client.py +0 -2
- package/tests/output/empty/setup.py +6 -4
- package/tests/output/empty/tea_python_tests/client.py +0 -2
- package/tests/output/exec/setup.py +6 -4
- package/tests/output/exec/tea_python_tests/exec_client.py +3 -2
- package/tests/output/function/setup.py +6 -4
- package/tests/output/function/tea_python_tests/client.py +2 -1
- package/tests/output/import/setup.py +5 -3
- package/tests/output/import/tea_python_tests/client.py +4 -3
- package/tests/output/map/setup.py +6 -4
- package/tests/output/map/tea_python_tests/client.py +3 -3
- package/tests/output/model/setup.py +6 -4
- package/tests/output/model/tea_python_tests/client.py +0 -2
- package/tests/output/model/tea_python_tests/exceptions/__init__.py +0 -2
- package/tests/output/model/tea_python_tests/exceptions/_main_file.py +3 -2
- package/tests/output/model/tea_python_tests/models/__init__.py +0 -2
- package/tests/output/model/tea_python_tests/models/_class.py +1 -1
- package/tests/output/model/tea_python_tests/models/_m.py +2 -2
- package/tests/output/model/tea_python_tests/models/_main_file.py +2 -2
- package/tests/output/model/tea_python_tests/models/_model.py +1 -1
- package/tests/output/model/tea_python_tests/models/_my_model.py +13 -12
- package/tests/output/modelConfig/setup.py +6 -4
- package/tests/output/modelConfig/tea_python_tests/client.py +0 -2
- package/tests/output/modelConfig/tea_python_tests/exceptions/__init__.py +0 -2
- package/tests/output/modelConfig/tea_python_tests/exceptions/_main_file.py +3 -2
- package/tests/output/modelConfig/tea_python_tests/models/__init__.py +0 -2
- package/tests/output/modelConfig/tea_python_tests/models/_class.py +1 -1
- package/tests/output/modelConfig/tea_python_tests/models/_m.py +2 -2
- package/tests/output/modelConfig/tea_python_tests/models/_main_file.py +2 -2
- package/tests/output/modelConfig/tea_python_tests/models/_model.py +1 -1
- package/tests/output/modelConfig/tea_python_tests/models/_my_model.py +13 -12
- package/tests/output/multi/setup.py +5 -3
- package/tests/output/multi/tea_python_tests/api.py +5 -5
- package/tests/output/multi/tea_python_tests/api_models/__init__.py +0 -2
- package/tests/output/multi/tea_python_tests/api_models/_test_model_dir_2.py +1 -1
- package/tests/output/multi/tea_python_tests/client.py +4 -3
- package/tests/output/multi/tea_python_tests/exceptions/__init__.py +0 -2
- package/tests/output/multi/tea_python_tests/exceptions/_err.py +1 -1
- package/tests/output/multi/tea_python_tests/lib/util.py +0 -1
- package/tests/output/multi/tea_python_tests/model/user.py +3 -2
- package/tests/output/multi/tea_python_tests/model/user_exceptions/__init__.py +0 -2
- package/tests/output/multi/tea_python_tests/model/user_exceptions/_err.py +1 -1
- package/tests/output/multi/tea_python_tests/model/user_exceptions/_err_1.py +1 -1
- package/tests/output/multi/tea_python_tests/model/user_exceptions/_err_2.py +1 -1
- package/tests/output/multi/tea_python_tests/model/user_models/__init__.py +0 -2
- package/tests/output/multi/tea_python_tests/model/user_models/_base_info.py +1 -1
- package/tests/output/multi/tea_python_tests/model/user_models/_info.py +1 -1
- package/tests/output/multi/tea_python_tests/models/__init__.py +0 -2
- package/tests/output/multi/tea_python_tests/models/_test_model_dir.py +3 -2
- package/tests/output/statements/setup.py +6 -4
- package/tests/output/statements/tea_python_tests/client.py +3 -3
- package/tests/output/super/setup.py +6 -4
- package/tests/output/super/tea_python_tests/client.py +2 -2
- package/tests/output/typedef/setup.py +5 -3
- package/tests/output/typedef/tea_python_tests/client.py +5 -5
- package/tests/output/typedef/tea_python_tests/models/__init__.py +0 -2
- package/tests/output/typedef/tea_python_tests/models/_m.py +3 -3
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from tea_python_tests import models as main_models
|
|
6
|
-
from darabonba.request import DaraRequest
|
|
7
|
-
from darabonba.response import DaraResponse
|
|
8
|
-
from Source import models as source_models
|
|
9
|
-
from Source.source_client import SourceClient
|
|
4
|
+
|
|
10
5
|
from typing import BinaryIO, List, Dict, Any
|
|
11
6
|
|
|
7
|
+
from darabonba.model import DaraModel
|
|
8
|
+
from darabonba.request import DaraRequest
|
|
9
|
+
from darabonba.response import DaraResponse
|
|
10
|
+
from Source import models as source_models
|
|
11
|
+
from Source.source_client import SourceClient
|
|
12
|
+
from tea_python_tests import models as main_models
|
|
12
13
|
|
|
13
14
|
class ComplexRequest(DaraModel):
|
|
14
15
|
def __init__(
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from darabonba.model import DaraModel
|
|
5
|
-
from tea_python_tests import models as main_models
|
|
6
4
|
|
|
5
|
+
from darabonba.model import DaraModel
|
|
6
|
+
from tea_python_tests import models as main_models
|
|
7
7
|
|
|
8
8
|
class Response(DaraModel):
|
|
9
9
|
def __init__(
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
from typing import Dict, List
|
|
6
6
|
|
|
7
|
+
from darabonba.core import DaraCore
|
|
7
8
|
|
|
8
9
|
class Client:
|
|
9
10
|
def __init__(self):
|
|
@@ -62,17 +62,19 @@ setup(
|
|
|
62
62
|
include_package_data=True,
|
|
63
63
|
platforms="any",
|
|
64
64
|
install_requires=REQUIRES,
|
|
65
|
-
python_requires=">=3.
|
|
65
|
+
python_requires=">=3.7",
|
|
66
66
|
classifiers=(
|
|
67
67
|
"Development Status :: 4 - Beta",
|
|
68
68
|
"Intended Audience :: Developers",
|
|
69
69
|
"License :: OSI Approved :: Apache Software License",
|
|
70
70
|
"Programming Language :: Python",
|
|
71
71
|
"Programming Language :: Python :: 3",
|
|
72
|
-
"Programming Language :: Python :: 3.6",
|
|
73
72
|
"Programming Language :: Python :: 3.7",
|
|
74
73
|
"Programming Language :: Python :: 3.8",
|
|
75
74
|
"Programming Language :: Python :: 3.9",
|
|
75
|
+
"Programming Language :: Python :: 3.10",
|
|
76
|
+
"Programming Language :: Python :: 3.11",
|
|
77
|
+
"Programming Language :: Python :: 3.12",
|
|
76
78
|
"Topic :: Software Development"
|
|
77
79
|
)
|
|
78
80
|
)
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from Source.source_client import SourceClient
|
|
6
|
-
from Source import models as source_models
|
|
4
|
+
|
|
7
5
|
from typing import List
|
|
8
6
|
|
|
7
|
+
from Local import models as local_models
|
|
8
|
+
from Source import models as source_models
|
|
9
|
+
from Source.source_client import SourceClient
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from Source.source_client import SourceClient
|
|
5
|
-
from Source import models as source_models
|
|
6
|
-
from darabonba.core import DaraCore
|
|
7
4
|
|
|
5
|
+
from darabonba.core import DaraCore
|
|
6
|
+
from Source import models as source_models
|
|
7
|
+
from Source.source_client import SourceClient
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from tea_python_tests import models as main_models
|
|
4
|
+
|
|
6
5
|
from typing import Dict
|
|
7
6
|
|
|
7
|
+
from darabonba.exceptions import DaraException
|
|
8
|
+
from tea_python_tests import models as main_models
|
|
8
9
|
|
|
9
10
|
class MainFileException(DaraException):
|
|
10
11
|
def __init__(
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from darabonba.model import DaraModel
|
|
5
|
-
from tea_python_tests import models as main_models
|
|
6
4
|
|
|
5
|
+
from darabonba.model import DaraModel
|
|
6
|
+
from tea_python_tests import models as main_models
|
|
7
7
|
|
|
8
8
|
class M(DaraModel):
|
|
9
9
|
def __init__(
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from darabonba.model import DaraModel
|
|
5
|
-
from tea_python_tests import models as main_models
|
|
6
4
|
|
|
5
|
+
from darabonba.model import DaraModel
|
|
6
|
+
from tea_python_tests import models as main_models
|
|
7
7
|
|
|
8
8
|
class MainFileModel(DaraModel):
|
|
9
9
|
def __init__(
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from tea_python_tests import models as main_models
|
|
6
|
-
from Source.client import Client as SourceClient
|
|
7
|
-
from Source import models as source_models
|
|
8
|
-
from darabonba.request import DaraRequest
|
|
4
|
+
|
|
9
5
|
from typing import List, Dict, Any, BinaryIO
|
|
10
6
|
|
|
7
|
+
from darabonba.model import DaraModel
|
|
8
|
+
from darabonba.request import DaraRequest
|
|
9
|
+
from Source import models as source_models
|
|
10
|
+
from Source.client import Client as SourceClient
|
|
11
|
+
from tea_python_tests import models as main_models
|
|
11
12
|
|
|
12
13
|
class MyModel(DaraModel):
|
|
13
14
|
def __init__(
|
|
@@ -450,8 +451,8 @@ class MyModel(DaraModel):
|
|
|
450
451
|
self.ssubarray = []
|
|
451
452
|
if m.get('ssubarray') is not None:
|
|
452
453
|
for k1 in m.get('ssubarray'):
|
|
454
|
+
l1 = []
|
|
453
455
|
for k2 in k1:
|
|
454
|
-
l1 = []
|
|
455
456
|
temp_model = main_models.M()
|
|
456
457
|
l1.append(temp_model.from_map(k2))
|
|
457
458
|
self.ssubarray.append(l1)
|
|
@@ -465,8 +466,8 @@ class MyModel(DaraModel):
|
|
|
465
466
|
self.ssubmmarray = []
|
|
466
467
|
if m.get('ssubmmarray') is not None:
|
|
467
468
|
for k1 in m.get('ssubmmarray'):
|
|
469
|
+
l1 = []
|
|
468
470
|
for k2 in k1:
|
|
469
|
-
l1 = []
|
|
470
471
|
temp_model = source_models.Request()
|
|
471
472
|
l1.append(temp_model.from_map(k2))
|
|
472
473
|
self.ssubmmarray.append(l1)
|
|
@@ -474,10 +475,10 @@ class MyModel(DaraModel):
|
|
|
474
475
|
self.sssubmmarray = []
|
|
475
476
|
if m.get('sssubmmarray') is not None:
|
|
476
477
|
for k1 in m.get('sssubmmarray'):
|
|
478
|
+
l1 = []
|
|
477
479
|
for k2 in k1:
|
|
478
|
-
|
|
480
|
+
l2 = []
|
|
479
481
|
for k3 in k2:
|
|
480
|
-
l2 = []
|
|
481
482
|
temp_model = source_models.Request()
|
|
482
483
|
l2.append(temp_model.from_map(k3))
|
|
483
484
|
l1.append(l2)
|
|
@@ -498,8 +499,8 @@ class MyModel(DaraModel):
|
|
|
498
499
|
self.arr_module_model_map = []
|
|
499
500
|
if m.get('arrModuleModelMap') is not None:
|
|
500
501
|
for k1 in m.get('arrModuleModelMap'):
|
|
502
|
+
d1 = {}
|
|
501
503
|
for k2, v2 in k1.items():
|
|
502
|
-
d1 = {}
|
|
503
504
|
temp_model = source_models.Request()
|
|
504
505
|
d1[k2] = temp_model.from_map(v2)
|
|
505
506
|
self.arr_module_model_map.append(d1)
|
|
@@ -507,10 +508,10 @@ class MyModel(DaraModel):
|
|
|
507
508
|
self.arrs_module_model_map = []
|
|
508
509
|
if m.get('arrsModuleModelMap') is not None:
|
|
509
510
|
for k1 in m.get('arrsModuleModelMap'):
|
|
511
|
+
l1 = []
|
|
510
512
|
for k2 in k1:
|
|
511
|
-
|
|
513
|
+
d2 = {}
|
|
512
514
|
for k3, v3 in k2.items():
|
|
513
|
-
d2 = {}
|
|
514
515
|
temp_model = source_models.Request()
|
|
515
516
|
d2[k3] = temp_model.from_map(v3)
|
|
516
517
|
l1.append(d2)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from tea_python_tests import models as main_models
|
|
4
|
+
|
|
6
5
|
from typing import Dict
|
|
7
6
|
|
|
7
|
+
from darabonba.exceptions import DaraException
|
|
8
|
+
from tea_python_tests import models as main_models
|
|
8
9
|
|
|
9
10
|
class MainFileException(DaraException):
|
|
10
11
|
def __init__(
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from darabonba.model import DaraModel
|
|
5
|
-
from tea_python_tests import models as main_models
|
|
6
4
|
|
|
5
|
+
from darabonba.model import DaraModel
|
|
6
|
+
from tea_python_tests import models as main_models
|
|
7
7
|
|
|
8
8
|
class M(DaraModel):
|
|
9
9
|
def __init__(
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from darabonba.model import DaraModel
|
|
5
|
-
from tea_python_tests import models as main_models
|
|
6
4
|
|
|
5
|
+
from darabonba.model import DaraModel
|
|
6
|
+
from tea_python_tests import models as main_models
|
|
7
7
|
|
|
8
8
|
class MainFileModel(DaraModel):
|
|
9
9
|
def __init__(
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from tea_python_tests import models as main_models
|
|
6
|
-
from Source.client import Client as SourceClient
|
|
7
|
-
from Source import models as source_models
|
|
8
|
-
from darabonba.request import DaraRequest
|
|
4
|
+
|
|
9
5
|
from typing import List, Dict, Any, BinaryIO
|
|
10
6
|
|
|
7
|
+
from darabonba.model import DaraModel
|
|
8
|
+
from darabonba.request import DaraRequest
|
|
9
|
+
from Source import models as source_models
|
|
10
|
+
from Source.client import Client as SourceClient
|
|
11
|
+
from tea_python_tests import models as main_models
|
|
11
12
|
|
|
12
13
|
class MyModel(DaraModel):
|
|
13
14
|
def __init__(
|
|
@@ -450,8 +451,8 @@ class MyModel(DaraModel):
|
|
|
450
451
|
if m.get('ssubarray') is not None:
|
|
451
452
|
self.ssubarray = []
|
|
452
453
|
for k1 in m.get('ssubarray'):
|
|
454
|
+
l1 = []
|
|
453
455
|
for k2 in k1:
|
|
454
|
-
l1 = []
|
|
455
456
|
temp_model = main_models.M()
|
|
456
457
|
l1.append(temp_model.from_map(k2))
|
|
457
458
|
self.ssubarray.append(l1)
|
|
@@ -465,8 +466,8 @@ class MyModel(DaraModel):
|
|
|
465
466
|
if m.get('ssubmmarray') is not None:
|
|
466
467
|
self.ssubmmarray = []
|
|
467
468
|
for k1 in m.get('ssubmmarray'):
|
|
469
|
+
l1 = []
|
|
468
470
|
for k2 in k1:
|
|
469
|
-
l1 = []
|
|
470
471
|
temp_model = source_models.Request()
|
|
471
472
|
l1.append(temp_model.from_map(k2))
|
|
472
473
|
self.ssubmmarray.append(l1)
|
|
@@ -474,10 +475,10 @@ class MyModel(DaraModel):
|
|
|
474
475
|
if m.get('sssubmmarray') is not None:
|
|
475
476
|
self.sssubmmarray = []
|
|
476
477
|
for k1 in m.get('sssubmmarray'):
|
|
478
|
+
l1 = []
|
|
477
479
|
for k2 in k1:
|
|
478
|
-
|
|
480
|
+
l2 = []
|
|
479
481
|
for k3 in k2:
|
|
480
|
-
l2 = []
|
|
481
482
|
temp_model = source_models.Request()
|
|
482
483
|
l2.append(temp_model.from_map(k3))
|
|
483
484
|
l1.append(l2)
|
|
@@ -498,8 +499,8 @@ class MyModel(DaraModel):
|
|
|
498
499
|
if m.get('arrModuleModelMap') is not None:
|
|
499
500
|
self.arr_module_model_map = []
|
|
500
501
|
for k1 in m.get('arrModuleModelMap'):
|
|
502
|
+
d1 = {}
|
|
501
503
|
for k2, v2 in k1.items():
|
|
502
|
-
d1 = {}
|
|
503
504
|
temp_model = source_models.Request()
|
|
504
505
|
d1[k2] = temp_model.from_map(v2)
|
|
505
506
|
self.arr_module_model_map.append(d1)
|
|
@@ -507,10 +508,10 @@ class MyModel(DaraModel):
|
|
|
507
508
|
if m.get('arrsModuleModelMap') is not None:
|
|
508
509
|
self.arrs_module_model_map = []
|
|
509
510
|
for k1 in m.get('arrsModuleModelMap'):
|
|
511
|
+
l1 = []
|
|
510
512
|
for k2 in k1:
|
|
511
|
-
|
|
513
|
+
d2 = {}
|
|
512
514
|
for k3, v3 in k2.items():
|
|
513
|
-
d2 = {}
|
|
514
515
|
temp_model = source_models.Request()
|
|
515
516
|
d2[k3] = temp_model.from_map(v3)
|
|
516
517
|
l1.append(d2)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from darabonba.core import DaraCore
|
|
5
|
-
from darabonba.exceptions import UnretryableException
|
|
6
|
-
from darabonba.policy.retry import RetryPolicyContext
|
|
7
|
-
from darabonba.request import DaraRequest
|
|
8
|
-
from tea_python_tests.lib.util import Util
|
|
9
4
|
|
|
5
|
+
from darabonba.core import DaraCore
|
|
6
|
+
from darabonba.exceptions import UnretryableException
|
|
7
|
+
from darabonba.policy.retry import RetryPolicyContext
|
|
8
|
+
from darabonba.request import DaraRequest
|
|
9
|
+
from tea_python_tests.lib.util import Util
|
|
10
10
|
|
|
11
11
|
class Client:
|
|
12
12
|
def __init__(self):
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from tea_python_tests.lib.util import Util
|
|
6
|
-
from tea_python_tests.api import Client as APIClient
|
|
4
|
+
|
|
7
5
|
from typing import Generator, AsyncGenerator
|
|
8
6
|
|
|
7
|
+
from tea_python_tests.api import Client as APIClient
|
|
8
|
+
from tea_python_tests.lib.util import Util
|
|
9
|
+
from tea_python_tests.model import user_models as user_models
|
|
9
10
|
|
|
10
11
|
class Client:
|
|
11
12
|
_user: user_models.Info = None
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from darabonba.exceptions import DaraException
|
|
5
4
|
|
|
5
|
+
from darabonba.exceptions import DaraException
|
|
6
6
|
|
|
7
7
|
class ERRException(DaraException):
|
|
8
8
|
def __init__(
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from tea_python_tests.lib.util import Util
|
|
4
|
+
|
|
6
5
|
from typing import Generator, AsyncGenerator
|
|
7
6
|
|
|
7
|
+
from alibabacloud_tea_util.util import Utils
|
|
8
|
+
from tea_python_tests.lib.util import Util
|
|
8
9
|
|
|
9
10
|
class Client:
|
|
10
11
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from darabonba.exceptions import DaraException
|
|
5
4
|
|
|
5
|
+
from darabonba.exceptions import DaraException
|
|
6
6
|
|
|
7
7
|
class ErrException(DaraException):
|
|
8
8
|
def __init__(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from tea_python_tests import user_exceptions as main_exceptions
|
|
5
4
|
|
|
5
|
+
from tea_python_tests import user_exceptions as main_exceptions
|
|
6
6
|
|
|
7
7
|
class Err1Exception(main_exceptions.BaseInfoException):
|
|
8
8
|
def __init__(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from tea_python_tests import user_exceptions as main_exceptions
|
|
5
4
|
|
|
5
|
+
from tea_python_tests import user_exceptions as main_exceptions
|
|
6
6
|
|
|
7
7
|
class Err2Exception(main_exceptions.ErrException):
|
|
8
8
|
def __init__(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# This file is auto-generated, don't edit it. Thanks.
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from tea_python_tests import user_models as main_models
|
|
5
4
|
|
|
5
|
+
from tea_python_tests import user_models as main_models
|
|
6
6
|
|
|
7
7
|
class Info(main_models.BaseInfo):
|
|
8
8
|
def __init__(
|