tccli 3.0.1391.1__py2.py3-none-any.whl → 3.0.1414.1__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.

Potentially problematic release.


This version of tccli might be problematic. Click here for more details.

Files changed (226) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +2 -1
  3. tccli/services/ai3d/v20250513/api.json +22 -4
  4. tccli/services/aiart/aiart_client.py +173 -67
  5. tccli/services/aiart/v20221229/api.json +193 -0
  6. tccli/services/aiart/v20221229/examples.json +16 -0
  7. tccli/services/apm/apm_client.py +53 -0
  8. tccli/services/apm/v20210622/api.json +354 -0
  9. tccli/services/apm/v20210622/examples.json +8 -0
  10. tccli/services/asr/v20190614/api.json +3 -3
  11. tccli/services/autoscaling/v20180419/api.json +24 -2
  12. tccli/services/batch/v20170312/api.json +1 -1
  13. tccli/services/bda/bda_client.py +15 -704
  14. tccli/services/bda/v20200324/api.json +107 -1819
  15. tccli/services/bda/v20200324/examples.json +0 -176
  16. tccli/services/billing/billing_client.py +326 -8
  17. tccli/services/billing/v20180709/api.json +2200 -255
  18. tccli/services/billing/v20180709/examples.json +48 -0
  19. tccli/services/cam/v20190116/api.json +4 -4
  20. tccli/services/captcha/v20190722/api.json +3 -3
  21. tccli/services/cat/v20180409/api.json +7 -7
  22. tccli/services/ccc/ccc_client.py +235 -76
  23. tccli/services/ccc/v20200210/api.json +502 -18
  24. tccli/services/ccc/v20200210/examples.json +24 -0
  25. tccli/services/cdb/cdb_client.py +106 -0
  26. tccli/services/cdb/v20170320/api.json +257 -44
  27. tccli/services/cdb/v20170320/examples.json +22 -6
  28. tccli/services/cdn/cdn_client.py +4 -163
  29. tccli/services/cdn/v20180606/api.json +61 -310
  30. tccli/services/cdn/v20180606/examples.json +1 -25
  31. tccli/services/cdwdoris/v20211228/api.json +51 -12
  32. tccli/services/cdwpg/v20201230/api.json +11 -1
  33. tccli/services/cdwpg/v20201230/examples.json +1 -1
  34. tccli/services/cfg/v20210820/api.json +11 -1
  35. tccli/services/cfs/cfs_client.py +41 -94
  36. tccli/services/cfs/v20190719/api.json +171 -55
  37. tccli/services/cfs/v20190719/examples.json +1 -9
  38. tccli/services/cfw/v20190904/api.json +122 -10
  39. tccli/services/ckafka/ckafka_client.py +188 -29
  40. tccli/services/ckafka/v20190819/api.json +277 -4
  41. tccli/services/ckafka/v20190819/examples.json +25 -1
  42. tccli/services/clb/clb_client.py +0 -265
  43. tccli/services/clb/v20180317/api.json +130 -296
  44. tccli/services/clb/v20180317/examples.json +12 -40
  45. tccli/services/cloudapp/v20220530/api.json +55 -0
  46. tccli/services/cloudaudit/v20190319/api.json +11 -0
  47. tccli/services/cloudhsm/v20191112/api.json +10 -10
  48. tccli/services/cls/v20201016/api.json +63 -45
  49. tccli/services/cls/v20201016/examples.json +10 -4
  50. tccli/services/csip/v20221121/api.json +53 -3
  51. tccli/services/ctem/v20231128/api.json +320 -0
  52. tccli/services/ctem/v20231128/examples.json +3 -3
  53. tccli/services/cvm/cvm_client.py +0 -212
  54. tccli/services/cvm/v20170312/api.json +91 -843
  55. tccli/services/cvm/v20170312/examples.json +32 -58
  56. tccli/services/cynosdb/cynosdb_client.py +167 -8
  57. tccli/services/cynosdb/v20190107/api.json +1126 -148
  58. tccli/services/cynosdb/v20190107/examples.json +31 -7
  59. tccli/services/dbbrain/dbbrain_client.py +246 -87
  60. tccli/services/dbbrain/v20191016/api.json +74 -62
  61. tccli/services/dbbrain/v20191016/examples.json +1 -1
  62. tccli/services/dbbrain/v20210527/api.json +601 -177
  63. tccli/services/dbbrain/v20210527/examples.json +28 -4
  64. tccli/services/dc/v20180410/api.json +101 -3
  65. tccli/services/dcdb/v20180411/api.json +1 -1
  66. tccli/services/dlc/dlc_client.py +53 -0
  67. tccli/services/dlc/v20210125/api.json +237 -24
  68. tccli/services/dlc/v20210125/examples.json +12 -4
  69. tccli/services/dnspod/dnspod_client.py +106 -0
  70. tccli/services/dnspod/v20210323/api.json +126 -20
  71. tccli/services/dnspod/v20210323/examples.json +17 -7
  72. tccli/services/dsgc/v20190723/api.json +73 -15
  73. tccli/services/dts/v20180330/api.json +4 -4
  74. tccli/services/dts/v20211206/api.json +408 -127
  75. tccli/services/dts/v20211206/examples.json +15 -9
  76. tccli/services/eb/v20210416/api.json +41 -1
  77. tccli/services/eb/v20210416/examples.json +1 -1
  78. tccli/services/emr/v20190103/api.json +56 -9
  79. tccli/services/emr/v20190103/examples.json +5 -5
  80. tccli/services/es/es_client.py +273 -8
  81. tccli/services/es/v20180416/api.json +845 -33
  82. tccli/services/es/v20180416/examples.json +33 -1
  83. tccli/services/es/v20250101/api.json +135 -2
  84. tccli/services/es/v20250101/examples.json +8 -0
  85. tccli/services/ess/ess_client.py +509 -32
  86. tccli/services/ess/v20201111/api.json +1366 -113
  87. tccli/services/ess/v20201111/examples.json +94 -10
  88. tccli/services/essbasic/v20210526/api.json +265 -27
  89. tccli/services/essbasic/v20210526/examples.json +12 -12
  90. tccli/services/facefusion/v20220927/api.json +1 -1
  91. tccli/services/gaap/v20180529/api.json +18 -8
  92. tccli/services/gme/gme_client.py +53 -0
  93. tccli/services/gme/v20180711/api.json +241 -1
  94. tccli/services/gme/v20180711/examples.json +8 -0
  95. tccli/services/gs/gs_client.py +216 -4
  96. tccli/services/gs/v20191118/api.json +202 -1
  97. tccli/services/gs/v20191118/examples.json +32 -0
  98. tccli/services/gwlb/gwlb_client.py +53 -0
  99. tccli/services/gwlb/v20240906/api.json +150 -0
  100. tccli/services/gwlb/v20240906/examples.json +8 -0
  101. tccli/services/hai/v20230812/api.json +5 -5
  102. tccli/services/hunyuan/v20230901/api.json +3 -3
  103. tccli/services/hunyuan/v20230901/examples.json +1 -1
  104. tccli/services/iai/v20180301/api.json +227 -207
  105. tccli/services/iai/v20180301/examples.json +26 -26
  106. tccli/services/iai/v20200303/api.json +4 -4
  107. tccli/services/iai/v20200303/examples.json +1 -1
  108. tccli/services/ioa/ioa_client.py +265 -0
  109. tccli/services/ioa/v20220601/api.json +781 -85
  110. tccli/services/ioa/v20220601/examples.json +46 -0
  111. tccli/services/iotexplorer/iotexplorer_client.py +387 -16
  112. tccli/services/iotexplorer/v20190423/api.json +1183 -63
  113. tccli/services/iotexplorer/v20190423/examples.json +92 -0
  114. tccli/services/keewidb/v20220308/api.json +69 -17
  115. tccli/services/keewidb/v20220308/examples.json +5 -5
  116. tccli/services/lcic/v20220817/api.json +61 -15
  117. tccli/services/lighthouse/v20200324/api.json +193 -24
  118. tccli/services/lighthouse/v20200324/examples.json +9 -3
  119. tccli/services/live/v20180801/api.json +6 -6
  120. tccli/services/live/v20180801/examples.json +7 -1
  121. tccli/services/lke/lke_client.py +40 -93
  122. tccli/services/lke/v20231130/api.json +943 -390
  123. tccli/services/lke/v20231130/examples.json +38 -46
  124. tccli/services/lkeap/v20240522/api.json +39 -12
  125. tccli/services/lkeap/v20240522/examples.json +12 -0
  126. tccli/services/mariadb/v20170312/api.json +1 -1
  127. tccli/services/mna/v20210119/api.json +11 -2
  128. tccli/services/mna/v20210119/examples.json +1 -1
  129. tccli/services/mongodb/mongodb_client.py +334 -16
  130. tccli/services/mongodb/v20190725/api.json +1092 -383
  131. tccli/services/mongodb/v20190725/examples.json +69 -21
  132. tccli/services/monitor/monitor_client.py +106 -0
  133. tccli/services/monitor/v20180724/api.json +383 -12
  134. tccli/services/monitor/v20180724/examples.json +24 -2
  135. tccli/services/mps/mps_client.py +220 -8
  136. tccli/services/mps/v20190612/api.json +1999 -179
  137. tccli/services/mps/v20190612/examples.json +56 -6
  138. tccli/services/mqtt/v20240516/api.json +10 -0
  139. tccli/services/mqtt/v20240516/examples.json +3 -9
  140. tccli/services/nlp/v20190408/api.json +6 -6
  141. tccli/services/oceanus/oceanus_client.py +318 -0
  142. tccli/services/oceanus/v20190422/api.json +461 -26
  143. tccli/services/oceanus/v20190422/examples.json +50 -2
  144. tccli/services/ocr/ocr_client.py +41 -253
  145. tccli/services/ocr/v20181119/api.json +153 -659
  146. tccli/services/ocr/v20181119/examples.json +8 -40
  147. tccli/services/omics/v20221128/api.json +90 -7
  148. tccli/services/organization/v20210331/api.json +46 -7
  149. tccli/services/postgres/v20170312/api.json +333 -77
  150. tccli/services/postgres/v20170312/examples.json +37 -31
  151. tccli/services/privatedns/privatedns_client.py +641 -58
  152. tccli/services/privatedns/v20201028/api.json +930 -19
  153. tccli/services/privatedns/v20201028/examples.json +91 -3
  154. tccli/services/pts/v20210728/api.json +2 -2
  155. tccli/services/redis/v20180412/api.json +303 -109
  156. tccli/services/redis/v20180412/examples.json +12 -12
  157. tccli/services/region/v20220627/api.json +1 -1
  158. tccli/services/rum/v20210622/api.json +22 -4
  159. tccli/services/rum/v20210622/examples.json +2 -2
  160. tccli/services/sms/v20190711/api.json +12 -12
  161. tccli/services/sms/v20190711/examples.json +9 -3
  162. tccli/services/sms/v20210111/api.json +13 -13
  163. tccli/services/sms/v20210111/examples.json +8 -2
  164. tccli/services/sqlserver/v20180328/api.json +46 -7
  165. tccli/services/sqlserver/v20180328/examples.json +2 -2
  166. tccli/services/ssl/v20191205/api.json +28 -0
  167. tccli/services/svp/v20240125/api.json +14 -4
  168. tccli/services/tag/v20180813/api.json +3 -3
  169. tccli/services/tat/v20201028/api.json +22 -3
  170. tccli/services/tcb/v20180608/api.json +1 -1
  171. tccli/services/tcss/tcss_client.py +228 -69
  172. tccli/services/tcss/v20201101/api.json +273 -25
  173. tccli/services/tcss/v20201101/examples.json +26 -2
  174. tccli/services/teo/teo_client.py +317 -52
  175. tccli/services/teo/v20220901/api.json +1824 -242
  176. tccli/services/teo/v20220901/examples.json +109 -21
  177. tccli/services/thpc/thpc_client.py +57 -4
  178. tccli/services/thpc/v20230321/api.json +163 -21
  179. tccli/services/thpc/v20230321/examples.json +13 -5
  180. tccli/services/tione/tione_client.py +163 -4
  181. tccli/services/tione/v20211111/api.json +285 -21
  182. tccli/services/tione/v20211111/examples.json +27 -3
  183. tccli/services/tke/tke_client.py +8 -8
  184. tccli/services/tke/v20180525/api.json +168 -130
  185. tccli/services/tke/v20180525/examples.json +20 -20
  186. tccli/services/tke/v20220501/api.json +215 -3
  187. tccli/services/tke/v20220501/examples.json +8 -0
  188. tccli/services/tms/tms_client.py +106 -0
  189. tccli/services/tms/v20201229/api.json +249 -3
  190. tccli/services/tms/v20201229/examples.json +16 -0
  191. tccli/services/tmt/v20180321/api.json +78 -1
  192. tccli/services/trabbit/v20230418/api.json +271 -4
  193. tccli/services/trabbit/v20230418/examples.json +9 -3
  194. tccli/services/trocket/v20230308/api.json +4 -4
  195. tccli/services/trro/trro_client.py +106 -0
  196. tccli/services/trro/v20220325/api.json +456 -0
  197. tccli/services/trro/v20220325/examples.json +16 -0
  198. tccli/services/trtc/v20190722/api.json +197 -49
  199. tccli/services/trtc/v20190722/examples.json +4 -4
  200. tccli/services/tse/v20201207/api.json +69 -2
  201. tccli/services/tse/v20201207/examples.json +3 -3
  202. tccli/services/tsf/v20180326/api.json +70 -7
  203. tccli/services/tsf/v20180326/examples.json +2 -2
  204. tccli/services/vclm/v20240523/api.json +145 -0
  205. tccli/services/vclm/v20240523/examples.json +16 -0
  206. tccli/services/vclm/vclm_client.py +106 -0
  207. tccli/services/vcube/v20220410/api.json +1 -1
  208. tccli/services/vod/v20180717/api.json +7 -7
  209. tccli/services/vpc/v20170312/api.json +1216 -70
  210. tccli/services/vpc/v20170312/examples.json +139 -3
  211. tccli/services/vpc/vpc_client.py +1023 -122
  212. tccli/services/vrs/v20200824/api.json +11 -11
  213. tccli/services/vrs/v20200824/examples.json +1 -1
  214. tccli/services/vtc/v20240223/api.json +14 -14
  215. tccli/services/waf/v20180125/api.json +812 -143
  216. tccli/services/waf/v20180125/examples.json +2 -2
  217. tccli/services/wedata/v20210820/api.json +1281 -601
  218. tccli/services/wedata/v20210820/examples.json +127 -157
  219. tccli/services/wedata/v20250806/api.json +19335 -0
  220. tccli/services/wedata/v20250806/examples.json +999 -0
  221. tccli/services/wedata/wedata_client.py +7072 -1131
  222. {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/METADATA +9 -7
  223. {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/RECORD +226 -224
  224. {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/WHEEL +1 -1
  225. {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/entry_points.txt +0 -0
  226. {tccli-3.0.1391.1.dist-info/license_files → tccli-3.0.1414.1.dist-info/licenses}/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1391.1'
1
+ __version__ = '3.0.1414.1'
@@ -757,7 +757,8 @@ SERVICE_VERSIONS = {
757
757
  "2021-01-29"
758
758
  ],
759
759
  "wedata": [
760
- "2021-08-20"
760
+ "2021-08-20",
761
+ "2025-08-06"
761
762
  ],
762
763
  "weilingwith": [
763
764
  "2023-04-27"
@@ -8,7 +8,7 @@
8
8
  "status": "online"
9
9
  },
10
10
  "QueryHunyuanTo3DProJob": {
11
- "document": "混元生3D接口,基于混元大模型,根据输入的文本描述/图片智能生成3D。\n默认提供1个并发,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后,才能开始处理下一个任务。",
11
+ "document": "混元生3D接口,基于混元大模型,根据输入的文本描述/图片智能生成3D。\n默认提供3个并发,代表最多能同时处理3个已提交的任务,上一个任务处理完毕后,才能开始处理下一个任务。",
12
12
  "input": "QueryHunyuanTo3DProJobRequest",
13
13
  "name": "查询混元生3D专业版任务",
14
14
  "output": "QueryHunyuanTo3DProJobResponse",
@@ -29,7 +29,7 @@
29
29
  "status": "online"
30
30
  },
31
31
  "SubmitHunyuanTo3DProJob": {
32
- "document": "混元生3D接口,基于混元大模型,根据输入的文本描述/图片智能生成3D。\n默认提供1个并发,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后,才能开始处理下一个任务。",
32
+ "document": "混元生3D接口,基于混元大模型,根据输入的文本描述/图片智能生成3D。\n默认提供3个并发,代表最多能同时处理3个已提交的任务,上一个任务处理完毕后,才能开始处理下一个任务。",
33
33
  "input": "SubmitHunyuanTo3DProJobRequest",
34
34
  "name": "提交混元生3D专业版任务",
35
35
  "output": "SubmitHunyuanTo3DProJobResponse",
@@ -422,7 +422,7 @@
422
422
  },
423
423
  {
424
424
  "disabled": false,
425
- "document": "生成3D模型的面数,默认值为500000。\n可支持生成面数范围,参考值:40000-500000。",
425
+ "document": "生成3D模型的面数,默认值为500000。\n可支持生成面数范围,参考值:40000-1500000。",
426
426
  "example": "400000",
427
427
  "member": "int64",
428
428
  "name": "FaceCount",
@@ -431,12 +431,21 @@
431
431
  },
432
432
  {
433
433
  "disabled": false,
434
- "document": "生成任务类型,默认Normal,参考值:\nNormal:可生成带纹理的几何模型。\nLowPoly:可生成智能减面后的模型。\nGeometry:可生成不带纹理的几何模型(白模),选择此任务时,EnablePBR参数不生效。\nSketch:可输入草图或线稿图生成模型。",
434
+ "document": "生成任务类型,默认Normal,参考值:\nNormal:可生成带纹理的几何模型。\nLowPoly:可生成智能减面后的模型。\nGeometry:可生成不带纹理的几何模型(白模),选择此任务时,EnablePBR参数不生效。\nSketch:可输入草图或线稿图生成模型,此模式下prompt和ImageUrl/ImageBase64可一起输入。",
435
435
  "example": "Normal",
436
436
  "member": "string",
437
437
  "name": "GenerateType",
438
438
  "required": false,
439
439
  "type": "string"
440
+ },
441
+ {
442
+ "disabled": false,
443
+ "document": "该参数仅在GenerateType中选择LowPoly模式可生效。\n\n多边形类型,表示模型的表面由几边形网格构成,默认为triangle,参考值:\ntriangle: 三角形面。\nquadrilateral: 四边形面与三角形面混合生成。",
444
+ "example": "triangle",
445
+ "member": "string",
446
+ "name": "PolygonType",
447
+ "required": false,
448
+ "type": "string"
440
449
  }
441
450
  ],
442
451
  "type": "object"
@@ -556,6 +565,15 @@
556
565
  "name": "ViewImageUrl",
557
566
  "required": false,
558
567
  "type": "string"
568
+ },
569
+ {
570
+ "disabled": false,
571
+ "document": "图片base64地址",
572
+ "example": "\t/9j/4QlQaHR0c...N6a2M5ZCI",
573
+ "member": "string",
574
+ "name": "ViewImageBase64",
575
+ "required": false,
576
+ "type": "string"
559
577
  }
560
578
  ],
561
579
  "usage": "in"
@@ -17,7 +17,7 @@ from tencentcloud.aiart.v20221229 import models as models_v20221229
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
- def doSubmitMemeJob(args, parsed_globals):
20
+ def doReplaceBackground(args, parsed_globals):
21
21
  g_param = parse_global_arg(parsed_globals)
22
22
 
23
23
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -46,11 +46,11 @@ def doSubmitMemeJob(args, parsed_globals):
46
46
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
47
47
  client._sdkVersion += ("_CLI_" + __version__)
48
48
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.SubmitMemeJobRequest()
49
+ model = models.ReplaceBackgroundRequest()
50
50
  model.from_json_string(json.dumps(args))
51
51
  start_time = time.time()
52
52
  while True:
53
- rsp = client.SubmitMemeJob(model)
53
+ rsp = client.ReplaceBackground(model)
54
54
  result = rsp.to_json_string()
55
55
  try:
56
56
  json_obj = json.loads(result)
@@ -69,7 +69,7 @@ def doSubmitMemeJob(args, parsed_globals):
69
69
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
70
 
71
71
 
72
- def doRefineImage(args, parsed_globals):
72
+ def doSubmitTrainPortraitModelJob(args, parsed_globals):
73
73
  g_param = parse_global_arg(parsed_globals)
74
74
 
75
75
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -98,11 +98,11 @@ def doRefineImage(args, parsed_globals):
98
98
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
99
99
  client._sdkVersion += ("_CLI_" + __version__)
100
100
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
- model = models.RefineImageRequest()
101
+ model = models.SubmitTrainPortraitModelJobRequest()
102
102
  model.from_json_string(json.dumps(args))
103
103
  start_time = time.time()
104
104
  while True:
105
- rsp = client.RefineImage(model)
105
+ rsp = client.SubmitTrainPortraitModelJob(model)
106
106
  result = rsp.to_json_string()
107
107
  try:
108
108
  json_obj = json.loads(result)
@@ -121,7 +121,7 @@ def doRefineImage(args, parsed_globals):
121
121
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
122
 
123
123
 
124
- def doSketchToImage(args, parsed_globals):
124
+ def doSubmitDrawPortraitJob(args, parsed_globals):
125
125
  g_param = parse_global_arg(parsed_globals)
126
126
 
127
127
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -150,11 +150,11 @@ def doSketchToImage(args, parsed_globals):
150
150
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
151
151
  client._sdkVersion += ("_CLI_" + __version__)
152
152
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
153
- model = models.SketchToImageRequest()
153
+ model = models.SubmitDrawPortraitJobRequest()
154
154
  model.from_json_string(json.dumps(args))
155
155
  start_time = time.time()
156
156
  while True:
157
- rsp = client.SketchToImage(model)
157
+ rsp = client.SubmitDrawPortraitJob(model)
158
158
  result = rsp.to_json_string()
159
159
  try:
160
160
  json_obj = json.loads(result)
@@ -173,7 +173,7 @@ def doSketchToImage(args, parsed_globals):
173
173
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
174
 
175
175
 
176
- def doSubmitTextToImageProJob(args, parsed_globals):
176
+ def doImageToImage(args, parsed_globals):
177
177
  g_param = parse_global_arg(parsed_globals)
178
178
 
179
179
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -202,11 +202,11 @@ def doSubmitTextToImageProJob(args, parsed_globals):
202
202
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
203
203
  client._sdkVersion += ("_CLI_" + __version__)
204
204
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
- model = models.SubmitTextToImageProJobRequest()
205
+ model = models.ImageToImageRequest()
206
206
  model.from_json_string(json.dumps(args))
207
207
  start_time = time.time()
208
208
  while True:
209
- rsp = client.SubmitTextToImageProJob(model)
209
+ rsp = client.ImageToImage(model)
210
210
  result = rsp.to_json_string()
211
211
  try:
212
212
  json_obj = json.loads(result)
@@ -225,7 +225,7 @@ def doSubmitTextToImageProJob(args, parsed_globals):
225
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
226
 
227
227
 
228
- def doReplaceBackground(args, parsed_globals):
228
+ def doRefineImage(args, parsed_globals):
229
229
  g_param = parse_global_arg(parsed_globals)
230
230
 
231
231
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -254,11 +254,11 @@ def doReplaceBackground(args, parsed_globals):
254
254
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
255
255
  client._sdkVersion += ("_CLI_" + __version__)
256
256
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
- model = models.ReplaceBackgroundRequest()
257
+ model = models.RefineImageRequest()
258
258
  model.from_json_string(json.dumps(args))
259
259
  start_time = time.time()
260
260
  while True:
261
- rsp = client.ReplaceBackground(model)
261
+ rsp = client.RefineImage(model)
262
262
  result = rsp.to_json_string()
263
263
  try:
264
264
  json_obj = json.loads(result)
@@ -277,7 +277,7 @@ def doReplaceBackground(args, parsed_globals):
277
277
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
278
 
279
279
 
280
- def doTextToImageRapid(args, parsed_globals):
280
+ def doImageOutpainting(args, parsed_globals):
281
281
  g_param = parse_global_arg(parsed_globals)
282
282
 
283
283
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -306,11 +306,11 @@ def doTextToImageRapid(args, parsed_globals):
306
306
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
307
307
  client._sdkVersion += ("_CLI_" + __version__)
308
308
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
- model = models.TextToImageRapidRequest()
309
+ model = models.ImageOutpaintingRequest()
310
310
  model.from_json_string(json.dumps(args))
311
311
  start_time = time.time()
312
312
  while True:
313
- rsp = client.TextToImageRapid(model)
313
+ rsp = client.ImageOutpainting(model)
314
314
  result = rsp.to_json_string()
315
315
  try:
316
316
  json_obj = json.loads(result)
@@ -329,7 +329,7 @@ def doTextToImageRapid(args, parsed_globals):
329
329
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
330
 
331
331
 
332
- def doSubmitTrainPortraitModelJob(args, parsed_globals):
332
+ def doGenerateAvatar(args, parsed_globals):
333
333
  g_param = parse_global_arg(parsed_globals)
334
334
 
335
335
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -358,11 +358,11 @@ def doSubmitTrainPortraitModelJob(args, parsed_globals):
358
358
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
359
359
  client._sdkVersion += ("_CLI_" + __version__)
360
360
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
361
- model = models.SubmitTrainPortraitModelJobRequest()
361
+ model = models.GenerateAvatarRequest()
362
362
  model.from_json_string(json.dumps(args))
363
363
  start_time = time.time()
364
364
  while True:
365
- rsp = client.SubmitTrainPortraitModelJob(model)
365
+ rsp = client.GenerateAvatar(model)
366
366
  result = rsp.to_json_string()
367
367
  try:
368
368
  json_obj = json.loads(result)
@@ -381,7 +381,7 @@ def doSubmitTrainPortraitModelJob(args, parsed_globals):
381
381
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
382
 
383
383
 
384
- def doImageOutpainting(args, parsed_globals):
384
+ def doQueryTextToImageJob(args, parsed_globals):
385
385
  g_param = parse_global_arg(parsed_globals)
386
386
 
387
387
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -410,11 +410,11 @@ def doImageOutpainting(args, parsed_globals):
410
410
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
411
411
  client._sdkVersion += ("_CLI_" + __version__)
412
412
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
413
- model = models.ImageOutpaintingRequest()
413
+ model = models.QueryTextToImageJobRequest()
414
414
  model.from_json_string(json.dumps(args))
415
415
  start_time = time.time()
416
416
  while True:
417
- rsp = client.ImageOutpainting(model)
417
+ rsp = client.QueryTextToImageJob(model)
418
418
  result = rsp.to_json_string()
419
419
  try:
420
420
  json_obj = json.loads(result)
@@ -433,7 +433,7 @@ def doImageOutpainting(args, parsed_globals):
433
433
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
434
 
435
435
 
436
- def doGenerateAvatar(args, parsed_globals):
436
+ def doSubmitMemeJob(args, parsed_globals):
437
437
  g_param = parse_global_arg(parsed_globals)
438
438
 
439
439
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -462,11 +462,115 @@ def doGenerateAvatar(args, parsed_globals):
462
462
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
463
463
  client._sdkVersion += ("_CLI_" + __version__)
464
464
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
465
- model = models.GenerateAvatarRequest()
465
+ model = models.SubmitMemeJobRequest()
466
466
  model.from_json_string(json.dumps(args))
467
467
  start_time = time.time()
468
468
  while True:
469
- rsp = client.GenerateAvatar(model)
469
+ rsp = client.SubmitMemeJob(model)
470
+ result = rsp.to_json_string()
471
+ try:
472
+ json_obj = json.loads(result)
473
+ except TypeError as e:
474
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
475
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
476
+ break
477
+ cur_time = time.time()
478
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
479
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
480
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
481
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
482
+ else:
483
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
484
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
485
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
+
487
+
488
+ def doSketchToImage(args, parsed_globals):
489
+ g_param = parse_global_arg(parsed_globals)
490
+
491
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
492
+ cred = credential.CVMRoleCredential()
493
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
494
+ cred = credential.STSAssumeRoleCredential(
495
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
496
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
497
+ )
498
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
499
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
500
+ else:
501
+ cred = credential.Credential(
502
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
503
+ )
504
+ http_profile = HttpProfile(
505
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
506
+ reqMethod="POST",
507
+ endpoint=g_param[OptionsDefine.Endpoint],
508
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
509
+ )
510
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
511
+ if g_param[OptionsDefine.Language]:
512
+ profile.language = g_param[OptionsDefine.Language]
513
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
514
+ client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
515
+ client._sdkVersion += ("_CLI_" + __version__)
516
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
517
+ model = models.SketchToImageRequest()
518
+ model.from_json_string(json.dumps(args))
519
+ start_time = time.time()
520
+ while True:
521
+ rsp = client.SketchToImage(model)
522
+ result = rsp.to_json_string()
523
+ try:
524
+ json_obj = json.loads(result)
525
+ except TypeError as e:
526
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
527
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
528
+ break
529
+ cur_time = time.time()
530
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
531
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
532
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
533
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
534
+ else:
535
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
536
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
537
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
538
+
539
+
540
+ def doQueryTextToImageProJob(args, parsed_globals):
541
+ g_param = parse_global_arg(parsed_globals)
542
+
543
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
544
+ cred = credential.CVMRoleCredential()
545
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
546
+ cred = credential.STSAssumeRoleCredential(
547
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
548
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
549
+ )
550
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
551
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
552
+ else:
553
+ cred = credential.Credential(
554
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
555
+ )
556
+ http_profile = HttpProfile(
557
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
558
+ reqMethod="POST",
559
+ endpoint=g_param[OptionsDefine.Endpoint],
560
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
561
+ )
562
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
563
+ if g_param[OptionsDefine.Language]:
564
+ profile.language = g_param[OptionsDefine.Language]
565
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
566
+ client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
567
+ client._sdkVersion += ("_CLI_" + __version__)
568
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
569
+ model = models.QueryTextToImageProJobRequest()
570
+ model.from_json_string(json.dumps(args))
571
+ start_time = time.time()
572
+ while True:
573
+ rsp = client.QueryTextToImageProJob(model)
470
574
  result = rsp.to_json_string()
471
575
  try:
472
576
  json_obj = json.loads(result)
@@ -589,7 +693,7 @@ def doQueryTrainPortraitModelJob(args, parsed_globals):
589
693
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
590
694
 
591
695
 
592
- def doQueryDrawPortraitJob(args, parsed_globals):
696
+ def doQueryGlamPicJob(args, parsed_globals):
593
697
  g_param = parse_global_arg(parsed_globals)
594
698
 
595
699
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -618,11 +722,11 @@ def doQueryDrawPortraitJob(args, parsed_globals):
618
722
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
619
723
  client._sdkVersion += ("_CLI_" + __version__)
620
724
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
621
- model = models.QueryDrawPortraitJobRequest()
725
+ model = models.QueryGlamPicJobRequest()
622
726
  model.from_json_string(json.dumps(args))
623
727
  start_time = time.time()
624
728
  while True:
625
- rsp = client.QueryDrawPortraitJob(model)
729
+ rsp = client.QueryGlamPicJob(model)
626
730
  result = rsp.to_json_string()
627
731
  try:
628
732
  json_obj = json.loads(result)
@@ -641,7 +745,7 @@ def doQueryDrawPortraitJob(args, parsed_globals):
641
745
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
746
 
643
747
 
644
- def doQueryGlamPicJob(args, parsed_globals):
748
+ def doImageInpaintingRemoval(args, parsed_globals):
645
749
  g_param = parse_global_arg(parsed_globals)
646
750
 
647
751
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -670,11 +774,11 @@ def doQueryGlamPicJob(args, parsed_globals):
670
774
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
671
775
  client._sdkVersion += ("_CLI_" + __version__)
672
776
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
673
- model = models.QueryGlamPicJobRequest()
777
+ model = models.ImageInpaintingRemovalRequest()
674
778
  model.from_json_string(json.dumps(args))
675
779
  start_time = time.time()
676
780
  while True:
677
- rsp = client.QueryGlamPicJob(model)
781
+ rsp = client.ImageInpaintingRemoval(model)
678
782
  result = rsp.to_json_string()
679
783
  try:
680
784
  json_obj = json.loads(result)
@@ -693,7 +797,7 @@ def doQueryGlamPicJob(args, parsed_globals):
693
797
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
694
798
 
695
799
 
696
- def doUploadTrainPortraitImages(args, parsed_globals):
800
+ def doTextToImageRapid(args, parsed_globals):
697
801
  g_param = parse_global_arg(parsed_globals)
698
802
 
699
803
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -722,11 +826,11 @@ def doUploadTrainPortraitImages(args, parsed_globals):
722
826
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
723
827
  client._sdkVersion += ("_CLI_" + __version__)
724
828
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
725
- model = models.UploadTrainPortraitImagesRequest()
829
+ model = models.TextToImageRapidRequest()
726
830
  model.from_json_string(json.dumps(args))
727
831
  start_time = time.time()
728
832
  while True:
729
- rsp = client.UploadTrainPortraitImages(model)
833
+ rsp = client.TextToImageRapid(model)
730
834
  result = rsp.to_json_string()
731
835
  try:
732
836
  json_obj = json.loads(result)
@@ -745,7 +849,7 @@ def doUploadTrainPortraitImages(args, parsed_globals):
745
849
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
850
 
747
851
 
748
- def doQueryTextToImageProJob(args, parsed_globals):
852
+ def doSubmitTextToImageProJob(args, parsed_globals):
749
853
  g_param = parse_global_arg(parsed_globals)
750
854
 
751
855
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -774,11 +878,11 @@ def doQueryTextToImageProJob(args, parsed_globals):
774
878
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
775
879
  client._sdkVersion += ("_CLI_" + __version__)
776
880
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
- model = models.QueryTextToImageProJobRequest()
881
+ model = models.SubmitTextToImageProJobRequest()
778
882
  model.from_json_string(json.dumps(args))
779
883
  start_time = time.time()
780
884
  while True:
781
- rsp = client.QueryTextToImageProJob(model)
885
+ rsp = client.SubmitTextToImageProJob(model)
782
886
  result = rsp.to_json_string()
783
887
  try:
784
888
  json_obj = json.loads(result)
@@ -797,7 +901,7 @@ def doQueryTextToImageProJob(args, parsed_globals):
797
901
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
902
 
799
903
 
800
- def doSubmitGlamPicJob(args, parsed_globals):
904
+ def doSubmitTextToImageJob(args, parsed_globals):
801
905
  g_param = parse_global_arg(parsed_globals)
802
906
 
803
907
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -826,11 +930,11 @@ def doSubmitGlamPicJob(args, parsed_globals):
826
930
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
827
931
  client._sdkVersion += ("_CLI_" + __version__)
828
932
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
829
- model = models.SubmitGlamPicJobRequest()
933
+ model = models.SubmitTextToImageJobRequest()
830
934
  model.from_json_string(json.dumps(args))
831
935
  start_time = time.time()
832
936
  while True:
833
- rsp = client.SubmitGlamPicJob(model)
937
+ rsp = client.SubmitTextToImageJob(model)
834
938
  result = rsp.to_json_string()
835
939
  try:
836
940
  json_obj = json.loads(result)
@@ -849,7 +953,7 @@ def doSubmitGlamPicJob(args, parsed_globals):
849
953
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
850
954
 
851
955
 
852
- def doChangeClothes(args, parsed_globals):
956
+ def doUploadTrainPortraitImages(args, parsed_globals):
853
957
  g_param = parse_global_arg(parsed_globals)
854
958
 
855
959
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -878,11 +982,11 @@ def doChangeClothes(args, parsed_globals):
878
982
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
879
983
  client._sdkVersion += ("_CLI_" + __version__)
880
984
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
- model = models.ChangeClothesRequest()
985
+ model = models.UploadTrainPortraitImagesRequest()
882
986
  model.from_json_string(json.dumps(args))
883
987
  start_time = time.time()
884
988
  while True:
885
- rsp = client.ChangeClothes(model)
989
+ rsp = client.UploadTrainPortraitImages(model)
886
990
  result = rsp.to_json_string()
887
991
  try:
888
992
  json_obj = json.loads(result)
@@ -901,7 +1005,7 @@ def doChangeClothes(args, parsed_globals):
901
1005
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
1006
 
903
1007
 
904
- def doImageInpaintingRemoval(args, parsed_globals):
1008
+ def doQueryDrawPortraitJob(args, parsed_globals):
905
1009
  g_param = parse_global_arg(parsed_globals)
906
1010
 
907
1011
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -930,11 +1034,11 @@ def doImageInpaintingRemoval(args, parsed_globals):
930
1034
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
931
1035
  client._sdkVersion += ("_CLI_" + __version__)
932
1036
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
- model = models.ImageInpaintingRemovalRequest()
1037
+ model = models.QueryDrawPortraitJobRequest()
934
1038
  model.from_json_string(json.dumps(args))
935
1039
  start_time = time.time()
936
1040
  while True:
937
- rsp = client.ImageInpaintingRemoval(model)
1041
+ rsp = client.QueryDrawPortraitJob(model)
938
1042
  result = rsp.to_json_string()
939
1043
  try:
940
1044
  json_obj = json.loads(result)
@@ -953,7 +1057,7 @@ def doImageInpaintingRemoval(args, parsed_globals):
953
1057
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
954
1058
 
955
1059
 
956
- def doSubmitDrawPortraitJob(args, parsed_globals):
1060
+ def doSubmitGlamPicJob(args, parsed_globals):
957
1061
  g_param = parse_global_arg(parsed_globals)
958
1062
 
959
1063
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -982,11 +1086,11 @@ def doSubmitDrawPortraitJob(args, parsed_globals):
982
1086
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
983
1087
  client._sdkVersion += ("_CLI_" + __version__)
984
1088
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
985
- model = models.SubmitDrawPortraitJobRequest()
1089
+ model = models.SubmitGlamPicJobRequest()
986
1090
  model.from_json_string(json.dumps(args))
987
1091
  start_time = time.time()
988
1092
  while True:
989
- rsp = client.SubmitDrawPortraitJob(model)
1093
+ rsp = client.SubmitGlamPicJob(model)
990
1094
  result = rsp.to_json_string()
991
1095
  try:
992
1096
  json_obj = json.loads(result)
@@ -1005,7 +1109,7 @@ def doSubmitDrawPortraitJob(args, parsed_globals):
1005
1109
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1006
1110
 
1007
1111
 
1008
- def doTextToImageLite(args, parsed_globals):
1112
+ def doChangeClothes(args, parsed_globals):
1009
1113
  g_param = parse_global_arg(parsed_globals)
1010
1114
 
1011
1115
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1034,11 +1138,11 @@ def doTextToImageLite(args, parsed_globals):
1034
1138
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
1035
1139
  client._sdkVersion += ("_CLI_" + __version__)
1036
1140
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1037
- model = models.TextToImageLiteRequest()
1141
+ model = models.ChangeClothesRequest()
1038
1142
  model.from_json_string(json.dumps(args))
1039
1143
  start_time = time.time()
1040
1144
  while True:
1041
- rsp = client.TextToImageLite(model)
1145
+ rsp = client.ChangeClothes(model)
1042
1146
  result = rsp.to_json_string()
1043
1147
  try:
1044
1148
  json_obj = json.loads(result)
@@ -1057,7 +1161,7 @@ def doTextToImageLite(args, parsed_globals):
1057
1161
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1058
1162
 
1059
1163
 
1060
- def doImageToImage(args, parsed_globals):
1164
+ def doTextToImageLite(args, parsed_globals):
1061
1165
  g_param = parse_global_arg(parsed_globals)
1062
1166
 
1063
1167
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1086,11 +1190,11 @@ def doImageToImage(args, parsed_globals):
1086
1190
  client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
1087
1191
  client._sdkVersion += ("_CLI_" + __version__)
1088
1192
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1089
- model = models.ImageToImageRequest()
1193
+ model = models.TextToImageLiteRequest()
1090
1194
  model.from_json_string(json.dumps(args))
1091
1195
  start_time = time.time()
1092
1196
  while True:
1093
- rsp = client.ImageToImage(model)
1197
+ rsp = client.TextToImageLite(model)
1094
1198
  result = rsp.to_json_string()
1095
1199
  try:
1096
1200
  json_obj = json.loads(result)
@@ -1120,27 +1224,29 @@ MODELS_MAP = {
1120
1224
  }
1121
1225
 
1122
1226
  ACTION_MAP = {
1123
- "SubmitMemeJob": doSubmitMemeJob,
1124
- "RefineImage": doRefineImage,
1125
- "SketchToImage": doSketchToImage,
1126
- "SubmitTextToImageProJob": doSubmitTextToImageProJob,
1127
1227
  "ReplaceBackground": doReplaceBackground,
1128
- "TextToImageRapid": doTextToImageRapid,
1129
1228
  "SubmitTrainPortraitModelJob": doSubmitTrainPortraitModelJob,
1229
+ "SubmitDrawPortraitJob": doSubmitDrawPortraitJob,
1230
+ "ImageToImage": doImageToImage,
1231
+ "RefineImage": doRefineImage,
1130
1232
  "ImageOutpainting": doImageOutpainting,
1131
1233
  "GenerateAvatar": doGenerateAvatar,
1234
+ "QueryTextToImageJob": doQueryTextToImageJob,
1235
+ "SubmitMemeJob": doSubmitMemeJob,
1236
+ "SketchToImage": doSketchToImage,
1237
+ "QueryTextToImageProJob": doQueryTextToImageProJob,
1132
1238
  "QueryMemeJob": doQueryMemeJob,
1133
1239
  "QueryTrainPortraitModelJob": doQueryTrainPortraitModelJob,
1134
- "QueryDrawPortraitJob": doQueryDrawPortraitJob,
1135
1240
  "QueryGlamPicJob": doQueryGlamPicJob,
1241
+ "ImageInpaintingRemoval": doImageInpaintingRemoval,
1242
+ "TextToImageRapid": doTextToImageRapid,
1243
+ "SubmitTextToImageProJob": doSubmitTextToImageProJob,
1244
+ "SubmitTextToImageJob": doSubmitTextToImageJob,
1136
1245
  "UploadTrainPortraitImages": doUploadTrainPortraitImages,
1137
- "QueryTextToImageProJob": doQueryTextToImageProJob,
1246
+ "QueryDrawPortraitJob": doQueryDrawPortraitJob,
1138
1247
  "SubmitGlamPicJob": doSubmitGlamPicJob,
1139
1248
  "ChangeClothes": doChangeClothes,
1140
- "ImageInpaintingRemoval": doImageInpaintingRemoval,
1141
- "SubmitDrawPortraitJob": doSubmitDrawPortraitJob,
1142
1249
  "TextToImageLite": doTextToImageLite,
1143
- "ImageToImage": doImageToImage,
1144
1250
 
1145
1251
  }
1146
1252