Skip to content

Commit 241a762

Browse files
committed
Update API CreateDataset: add request parameters WorkflowParameters.
1 parent 7e7f40f commit 241a762

12 files changed

+431
-7
lines changed

imm-20200930/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alicloud/imm20200930",
3-
"version": "4.4.3",
3+
"version": "4.4.4",
44
"description": "",
55
"main": "dist/client.js",
66
"scripts": {

imm-20200930/src/client.ts

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,12 +1251,18 @@ export default class Client extends OpenApi {
12511251
* * A project has an upper limit on the number of datasets that can be created in the project. You can call the [GetProjcet](https://help.aliyun.com/document_detail/478155.html) operation to query the dataset limit of the project.
12521252
* * After creating a dataset, you can call the [IndexFileMeta](https://help.aliyun.com/document_detail/478166.html) operation to index metadata. Metadata indexing enhances [data retrieval efficiency and statistics collection](https://help.aliyun.com/document_detail/478175.html), and enables intelligent data management.
12531253
*
1254-
* @param request - CreateDatasetRequest
1254+
* @param tmpReq - CreateDatasetRequest
12551255
* @param runtime - runtime options for this request RuntimeOptions
12561256
* @returns CreateDatasetResponse
12571257
*/
1258-
async createDatasetWithOptions(request: $_model.CreateDatasetRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateDatasetResponse> {
1259-
request.validate();
1258+
async createDatasetWithOptions(tmpReq: $_model.CreateDatasetRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateDatasetResponse> {
1259+
tmpReq.validate();
1260+
let request = new $_model.CreateDatasetShrinkRequest({ });
1261+
OpenApiUtil.convert(tmpReq, request);
1262+
if (!$dara.isNull(tmpReq.workflowParameters)) {
1263+
request.workflowParametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.workflowParameters, "WorkflowParameters", "json");
1264+
}
1265+
12601266
let query = { };
12611267
if (!$dara.isNull(request.datasetMaxBindCount)) {
12621268
query["DatasetMaxBindCount"] = request.datasetMaxBindCount;
@@ -1294,6 +1300,10 @@ export default class Client extends OpenApi {
12941300
query["TemplateId"] = request.templateId;
12951301
}
12961302

1303+
if (!$dara.isNull(request.workflowParametersShrink)) {
1304+
query["WorkflowParameters"] = request.workflowParametersShrink;
1305+
}
1306+
12971307
let req = new $OpenApiUtil.OpenApiRequest({
12981308
query: OpenApiUtil.query(query),
12991309
});
@@ -7725,12 +7735,18 @@ export default class Client extends OpenApi {
77257735
/**
77267736
* Updates a dataset.
77277737
*
7728-
* @param request - UpdateDatasetRequest
7738+
* @param tmpReq - UpdateDatasetRequest
77297739
* @param runtime - runtime options for this request RuntimeOptions
77307740
* @returns UpdateDatasetResponse
77317741
*/
7732-
async updateDatasetWithOptions(request: $_model.UpdateDatasetRequest, runtime: $dara.RuntimeOptions): Promise<$_model.UpdateDatasetResponse> {
7733-
request.validate();
7742+
async updateDatasetWithOptions(tmpReq: $_model.UpdateDatasetRequest, runtime: $dara.RuntimeOptions): Promise<$_model.UpdateDatasetResponse> {
7743+
tmpReq.validate();
7744+
let request = new $_model.UpdateDatasetShrinkRequest({ });
7745+
OpenApiUtil.convert(tmpReq, request);
7746+
if (!$dara.isNull(tmpReq.workflowParameters)) {
7747+
request.workflowParametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.workflowParameters, "WorkflowParameters", "json");
7748+
}
7749+
77347750
let query = { };
77357751
if (!$dara.isNull(request.datasetMaxBindCount)) {
77367752
query["DatasetMaxBindCount"] = request.datasetMaxBindCount;
@@ -7768,6 +7784,10 @@ export default class Client extends OpenApi {
77687784
query["TemplateId"] = request.templateId;
77697785
}
77707786

7787+
if (!$dara.isNull(request.workflowParametersShrink)) {
7788+
query["WorkflowParameters"] = request.workflowParametersShrink;
7789+
}
7790+
77717791
let req = new $OpenApiUtil.OpenApiRequest({
77727792
query: OpenApiUtil.query(query),
77737793
});

imm-20200930/src/models/CreateDatasetRequest.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// This file is auto-generated, don't edit it
22
import * as $dara from '@darabonba/typescript';
3+
import { WorkflowParameter } from "./WorkflowParameter";
34

45

56
export class CreateDatasetRequest extends $dara.Model {
@@ -83,6 +84,7 @@ export class CreateDatasetRequest extends $dara.Model {
8384
* Official:AllFunction
8485
*/
8586
templateId?: string;
87+
workflowParameters?: WorkflowParameter[];
8688
static names(): { [key: string]: string } {
8789
return {
8890
datasetMaxBindCount: 'DatasetMaxBindCount',
@@ -94,6 +96,7 @@ export class CreateDatasetRequest extends $dara.Model {
9496
description: 'Description',
9597
projectName: 'ProjectName',
9698
templateId: 'TemplateId',
99+
workflowParameters: 'WorkflowParameters',
97100
};
98101
}
99102

@@ -108,10 +111,14 @@ export class CreateDatasetRequest extends $dara.Model {
108111
description: 'string',
109112
projectName: 'string',
110113
templateId: 'string',
114+
workflowParameters: { 'type': 'array', 'itemType': WorkflowParameter },
111115
};
112116
}
113117

114118
validate() {
119+
if(Array.isArray(this.workflowParameters)) {
120+
$dara.Model.validateArray(this.workflowParameters);
121+
}
115122
super.validate();
116123
}
117124

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class CreateDatasetShrinkRequest extends $dara.Model {
6+
/**
7+
* @remarks
8+
* The maximum number of bindings for the dataset. Valid values: 1 to 10. Default value: 10.
9+
*
10+
* @example
11+
* 10
12+
*/
13+
datasetMaxBindCount?: number;
14+
/**
15+
* @remarks
16+
* The maximum number of metadata entities in the dataset. Default value: 10000000000.
17+
*
18+
* @example
19+
* 10000000000
20+
*/
21+
datasetMaxEntityCount?: number;
22+
/**
23+
* @remarks
24+
* The maximum number of files in the dataset. Valid values: 1 to 100000000. Default value: 100000000.
25+
*
26+
* @example
27+
* 100000000
28+
*/
29+
datasetMaxFileCount?: number;
30+
/**
31+
* @remarks
32+
* The maximum number of metadata relationships in the dataset. Default value: 100000000000.
33+
*
34+
* @example
35+
* 100000000000
36+
*/
37+
datasetMaxRelationCount?: number;
38+
/**
39+
* @remarks
40+
* The maximum total file size for the dataset. If the total file size of the dataset exceeds this limit, indexes can no longer be added. Default value: 90000000000000000. Unit: bytes.
41+
*
42+
* @example
43+
* 90000000000000000
44+
*/
45+
datasetMaxTotalFileSize?: number;
46+
/**
47+
* @remarks
48+
* The name of the dataset. The dataset name must be unique in the same project. The name must meet the following requirements:
49+
*
50+
* * The name must be 1 to 128 characters in length.
51+
* * The name can contain only letters, digits, hyphens (-), and underscores (_).
52+
* * The name must start with a letter or underscore (_).
53+
*
54+
* This parameter is required.
55+
*
56+
* @example
57+
* dataset001
58+
*/
59+
datasetName?: string;
60+
/**
61+
* @remarks
62+
* The description of the dataset. The description must be 1 to 256 characters in length. You can leave this parameter empty.
63+
*
64+
* @example
65+
* immtest
66+
*/
67+
description?: string;
68+
/**
69+
* @remarks
70+
* The name of the project.[](~~478153~~)
71+
*
72+
* This parameter is required.
73+
*
74+
* @example
75+
* test-project
76+
*/
77+
projectName?: string;
78+
/**
79+
* @remarks
80+
* The ID of the workflow template. For more information, see [Workflow templates and operators](https://help.aliyun.com/document_detail/466304.html).
81+
*
82+
* @example
83+
* Official:AllFunction
84+
*/
85+
templateId?: string;
86+
workflowParametersShrink?: string;
87+
static names(): { [key: string]: string } {
88+
return {
89+
datasetMaxBindCount: 'DatasetMaxBindCount',
90+
datasetMaxEntityCount: 'DatasetMaxEntityCount',
91+
datasetMaxFileCount: 'DatasetMaxFileCount',
92+
datasetMaxRelationCount: 'DatasetMaxRelationCount',
93+
datasetMaxTotalFileSize: 'DatasetMaxTotalFileSize',
94+
datasetName: 'DatasetName',
95+
description: 'Description',
96+
projectName: 'ProjectName',
97+
templateId: 'TemplateId',
98+
workflowParametersShrink: 'WorkflowParameters',
99+
};
100+
}
101+
102+
static types(): { [key: string]: any } {
103+
return {
104+
datasetMaxBindCount: 'number',
105+
datasetMaxEntityCount: 'number',
106+
datasetMaxFileCount: 'number',
107+
datasetMaxRelationCount: 'number',
108+
datasetMaxTotalFileSize: 'number',
109+
datasetName: 'string',
110+
description: 'string',
111+
projectName: 'string',
112+
templateId: 'string',
113+
workflowParametersShrink: 'string',
114+
};
115+
}
116+
117+
validate() {
118+
super.validate();
119+
}
120+
121+
constructor(map?: { [key: string]: any }) {
122+
super(map);
123+
}
124+
}
125+

imm-20200930/src/models/File.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { CroppingSuggestion } from "./CroppingSuggestion";
77
import { Element } from "./Element";
88
import { Figure } from "./Figure";
99
import { ImageScore } from "./ImageScore";
10+
import { Insights } from "./Insights";
1011
import { Label } from "./Label";
1112
import { OCRContents } from "./Ocrcontents";
1213
import { SceneElement } from "./SceneElement";
@@ -52,6 +53,11 @@ export class File extends $dara.Model {
5253
imageHeight?: number;
5354
imageScore?: ImageScore;
5455
imageWidth?: number;
56+
/**
57+
* **if can be null:**
58+
* true
59+
*/
60+
insights?: Insights;
5561
labels?: Label[];
5662
language?: string;
5763
latLong?: string;
@@ -137,6 +143,7 @@ export class File extends $dara.Model {
137143
imageHeight: 'ImageHeight',
138144
imageScore: 'ImageScore',
139145
imageWidth: 'ImageWidth',
146+
insights: 'Insights',
140147
labels: 'Labels',
141148
language: 'Language',
142149
latLong: 'LatLong',
@@ -225,6 +232,7 @@ export class File extends $dara.Model {
225232
imageHeight: 'number',
226233
imageScore: ImageScore,
227234
imageWidth: 'number',
235+
insights: Insights,
228236
labels: { 'type': 'array', 'itemType': Label },
229237
language: 'string',
230238
latLong: 'string',
@@ -299,6 +307,9 @@ export class File extends $dara.Model {
299307
if(this.imageScore && typeof (this.imageScore as any).validate === 'function') {
300308
(this.imageScore as any).validate();
301309
}
310+
if(this.insights && typeof (this.insights as any).validate === 'function') {
311+
(this.insights as any).validate();
312+
}
302313
if(Array.isArray(this.labels)) {
303314
$dara.Model.validateArray(this.labels);
304315
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class ImageInsight extends $dara.Model {
6+
/**
7+
* **if can be null:**
8+
* true
9+
*/
10+
caption?: string;
11+
/**
12+
* **if can be null:**
13+
* true
14+
*/
15+
description?: string;
16+
static names(): { [key: string]: string } {
17+
return {
18+
caption: 'Caption',
19+
description: 'Description',
20+
};
21+
}
22+
23+
static types(): { [key: string]: any } {
24+
return {
25+
caption: 'string',
26+
description: 'string',
27+
};
28+
}
29+
30+
validate() {
31+
super.validate();
32+
}
33+
34+
constructor(map?: { [key: string]: any }) {
35+
super(map);
36+
}
37+
}
38+

imm-20200930/src/models/Insights.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
import { ImageInsight } from "./ImageInsight";
4+
import { VideoInsight } from "./VideoInsight";
5+
6+
7+
export class Insights extends $dara.Model {
8+
/**
9+
* **if can be null:**
10+
* true
11+
*/
12+
image?: ImageInsight;
13+
/**
14+
* **if can be null:**
15+
* true
16+
*/
17+
video?: VideoInsight;
18+
static names(): { [key: string]: string } {
19+
return {
20+
image: 'Image',
21+
video: 'Video',
22+
};
23+
}
24+
25+
static types(): { [key: string]: any } {
26+
return {
27+
image: ImageInsight,
28+
video: VideoInsight,
29+
};
30+
}
31+
32+
validate() {
33+
if(this.image && typeof (this.image as any).validate === 'function') {
34+
(this.image as any).validate();
35+
}
36+
if(this.video && typeof (this.video as any).validate === 'function') {
37+
(this.video as any).validate();
38+
}
39+
super.validate();
40+
}
41+
42+
constructor(map?: { [key: string]: any }) {
43+
super(map);
44+
}
45+
}
46+

0 commit comments

Comments
 (0)