Skip to content

Commit 1e4008f

Browse files
committed
Update API ListTemplate: add request parameters Tag.
1 parent 2ddfa9c commit 1e4008f

File tree

6 files changed

+162
-4
lines changed

6 files changed

+162
-4
lines changed

bpstudio-20210931/package.json

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

bpstudio-20210931/src/client.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,12 +1217,18 @@ export default class Client extends OpenApi {
12171217
/**
12181218
* Queries templates, including information such as the template name, architecture image URL, and URL of the serialized architecture image file.
12191219
*
1220-
* @param request - ListTemplateRequest
1220+
* @param tmpReq - ListTemplateRequest
12211221
* @param runtime - runtime options for this request RuntimeOptions
12221222
* @returns ListTemplateResponse
12231223
*/
1224-
async listTemplateWithOptions(request: $_model.ListTemplateRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ListTemplateResponse> {
1225-
request.validate();
1224+
async listTemplateWithOptions(tmpReq: $_model.ListTemplateRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ListTemplateResponse> {
1225+
tmpReq.validate();
1226+
let request = new $_model.ListTemplateShrinkRequest({ });
1227+
OpenApiUtil.convert(tmpReq, request);
1228+
if (!$dara.isNull(tmpReq.tag)) {
1229+
request.tagShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tag, "Tag", "json");
1230+
}
1231+
12261232
let body : {[key: string ]: any} = { };
12271233
if (!$dara.isNull(request.keyword)) {
12281234
body["Keyword"] = request.keyword;
@@ -1244,6 +1250,10 @@ export default class Client extends OpenApi {
12441250
body["ResourceGroupId"] = request.resourceGroupId;
12451251
}
12461252

1253+
if (!$dara.isNull(request.tagShrink)) {
1254+
body["Tag"] = request.tagShrink;
1255+
}
1256+
12471257
if (!$dara.isNull(request.tagList)) {
12481258
body["TagList"] = request.tagList;
12491259
}

bpstudio-20210931/src/models/ListTemplateRequest.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 { ListTemplateRequestTag } from "./ListTemplateRequestTag";
34

45

56
export class ListTemplateRequest extends $dara.Model {
@@ -53,6 +54,7 @@ export class ListTemplateRequest extends $dara.Model {
5354
* rg-acfmyjt3c5om3hi
5455
*/
5556
resourceGroupId?: string;
57+
tag?: ListTemplateRequestTag[];
5658
/**
5759
* @remarks
5860
* The tag that you want to use to query templates.
@@ -78,6 +80,7 @@ export class ListTemplateRequest extends $dara.Model {
7880
nextToken: 'NextToken',
7981
orderType: 'OrderType',
8082
resourceGroupId: 'ResourceGroupId',
83+
tag: 'Tag',
8184
tagList: 'TagList',
8285
type: 'Type',
8386
};
@@ -90,12 +93,16 @@ export class ListTemplateRequest extends $dara.Model {
9093
nextToken: 'number',
9194
orderType: 'number',
9295
resourceGroupId: 'string',
96+
tag: { 'type': 'array', 'itemType': ListTemplateRequestTag },
9397
tagList: 'number',
9498
type: 'string',
9599
};
96100
}
97101

98102
validate() {
103+
if(Array.isArray(this.tag)) {
104+
$dara.Model.validateArray(this.tag);
105+
}
99106
super.validate();
100107
}
101108

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class ListTemplateRequestTag extends $dara.Model {
6+
key?: string;
7+
value?: string;
8+
static names(): { [key: string]: string } {
9+
return {
10+
key: 'Key',
11+
value: 'Value',
12+
};
13+
}
14+
15+
static types(): { [key: string]: any } {
16+
return {
17+
key: 'string',
18+
value: 'string',
19+
};
20+
}
21+
22+
validate() {
23+
super.validate();
24+
}
25+
26+
constructor(map?: { [key: string]: any }) {
27+
super(map);
28+
}
29+
}
30+
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class ListTemplateShrinkRequest extends $dara.Model {
6+
/**
7+
* @remarks
8+
* The keyword that is used to search for templates.
9+
*
10+
* @example
11+
* cadt
12+
*/
13+
keyword?: string;
14+
/**
15+
* @remarks
16+
* The number of entries to return on each page.
17+
*
18+
* This parameter is required.
19+
*
20+
* @example
21+
* 10
22+
*/
23+
maxResults?: number;
24+
/**
25+
* @remarks
26+
* The number of the page to return.
27+
*
28+
* This parameter is required.
29+
*
30+
* @example
31+
* 1
32+
*/
33+
nextToken?: number;
34+
/**
35+
* @remarks
36+
* The criterion by which the returned templates are sorted. Valid values:
37+
*
38+
* * 1: The templates are sorted by the time when they are updated.
39+
* * 2: The templates are sorted by the time when they are created.
40+
* * 3: The templates are sorted by the system.
41+
* * 4: The templates are sorted by the number of times that they are used.
42+
* * If you specify an integer other than 1, 2, 3, and 4 or do not specify any value, the templates are sorted by the system.
43+
*
44+
* @example
45+
* 1
46+
*/
47+
orderType?: number;
48+
/**
49+
* @remarks
50+
* The ID of the resource group.
51+
*
52+
* @example
53+
* rg-acfmyjt3c5om3hi
54+
*/
55+
resourceGroupId?: string;
56+
tagShrink?: string;
57+
/**
58+
* @remarks
59+
* The tag that you want to use to query templates.
60+
*
61+
* @example
62+
* 1
63+
*/
64+
tagList?: number;
65+
/**
66+
* @remarks
67+
* The type of the templates to be returned. Valid values: public and private
68+
*
69+
* This parameter is required.
70+
*
71+
* @example
72+
* public
73+
*/
74+
type?: string;
75+
static names(): { [key: string]: string } {
76+
return {
77+
keyword: 'Keyword',
78+
maxResults: 'MaxResults',
79+
nextToken: 'NextToken',
80+
orderType: 'OrderType',
81+
resourceGroupId: 'ResourceGroupId',
82+
tagShrink: 'Tag',
83+
tagList: 'TagList',
84+
type: 'Type',
85+
};
86+
}
87+
88+
static types(): { [key: string]: any } {
89+
return {
90+
keyword: 'string',
91+
maxResults: 'number',
92+
nextToken: 'number',
93+
orderType: 'number',
94+
resourceGroupId: 'string',
95+
tagShrink: 'string',
96+
tagList: 'number',
97+
type: 'string',
98+
};
99+
}
100+
101+
validate() {
102+
super.validate();
103+
}
104+
105+
constructor(map?: { [key: string]: any }) {
106+
super(map);
107+
}
108+
}
109+

bpstudio-20210931/src/models/model.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export { ListApplicationResponseBodyData } from './ListApplicationResponseBodyDa
2020
export { ListFoCreatedAppsResponseBodyData } from './ListFoCreatedAppsResponseBodyData';
2121
export { ListTagResourcesRequestTag } from './ListTagResourcesRequestTag';
2222
export { ListTagResourcesResponseBodyTagResources } from './ListTagResourcesResponseBodyTagResources';
23+
export { ListTemplateRequestTag } from './ListTemplateRequestTag';
2324
export { ListTemplateResponseBodyData } from './ListTemplateResponseBodyData';
2425
export { ModifyApplicationSpecRequestInstanceSpec } from './ModifyApplicationSpecRequestInstanceSpec';
2526
export { QueryInstanceSpec4ModifyResponseBodyDataOptionalValues } from './QueryInstanceSpec4modifyResponseBodyDataOptionalValues';
@@ -97,6 +98,7 @@ export { ListTagResourcesRequest } from './ListTagResourcesRequest';
9798
export { ListTagResourcesResponseBody } from './ListTagResourcesResponseBody';
9899
export { ListTagResourcesResponse } from './ListTagResourcesResponse';
99100
export { ListTemplateRequest } from './ListTemplateRequest';
101+
export { ListTemplateShrinkRequest } from './ListTemplateShrinkRequest';
100102
export { ListTemplateResponseBody } from './ListTemplateResponseBody';
101103
export { ListTemplateResponse } from './ListTemplateResponse';
102104
export { ModifyApplicationSpecRequest } from './ModifyApplicationSpecRequest';

0 commit comments

Comments
 (0)