@alicloud/apig20240327 4.3.2 → 4.4.0
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/dist/client.d.ts +54 -0
- package/dist/client.js +180 -0
- package/dist/client.js.map +1 -1
- package/dist/models/CreateAndAttachPolicyRequest.d.ts +58 -0
- package/dist/models/CreateAndAttachPolicyRequest.js +75 -0
- package/dist/models/CreateAndAttachPolicyRequest.js.map +1 -0
- package/dist/models/CreateAndAttachPolicyResponse.d.ts +19 -0
- package/dist/models/CreateAndAttachPolicyResponse.js +69 -0
- package/dist/models/CreateAndAttachPolicyResponse.js.map +1 -0
- package/dist/models/CreateAndAttachPolicyResponseBody.d.ts +48 -0
- package/dist/models/CreateAndAttachPolicyResponseBody.js +92 -0
- package/dist/models/CreateAndAttachPolicyResponseBody.js.map +1 -0
- package/dist/models/ListPoliciesRequest.d.ts +39 -0
- package/dist/models/ListPoliciesRequest.js +68 -0
- package/dist/models/ListPoliciesRequest.js.map +1 -0
- package/dist/models/ListPoliciesResponse.d.ts +19 -0
- package/dist/models/ListPoliciesResponse.js +69 -0
- package/dist/models/ListPoliciesResponse.js.map +1 -0
- package/dist/models/ListPoliciesResponseBody.d.ts +58 -0
- package/dist/models/ListPoliciesResponseBody.js +96 -0
- package/dist/models/ListPoliciesResponseBody.js.map +1 -0
- package/dist/models/UpdateAndAttachPolicyRequest.d.ts +50 -0
- package/dist/models/UpdateAndAttachPolicyRequest.js +73 -0
- package/dist/models/UpdateAndAttachPolicyRequest.js.map +1 -0
- package/dist/models/UpdateAndAttachPolicyResponse.d.ts +19 -0
- package/dist/models/UpdateAndAttachPolicyResponse.js +69 -0
- package/dist/models/UpdateAndAttachPolicyResponse.js.map +1 -0
- package/dist/models/UpdateAndAttachPolicyResponseBody.d.ts +28 -0
- package/dist/models/UpdateAndAttachPolicyResponseBody.js +62 -0
- package/dist/models/UpdateAndAttachPolicyResponseBody.js.map +1 -0
- package/dist/models/model.d.ts +11 -0
- package/dist/models/model.js +30 -8
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +207 -0
- package/src/models/CreateAndAttachPolicyRequest.ts +88 -0
- package/src/models/CreateAndAttachPolicyResponse.ts +40 -0
- package/src/models/CreateAndAttachPolicyResponseBody.ts +85 -0
- package/src/models/ListPoliciesRequest.ts +62 -0
- package/src/models/ListPoliciesResponse.ts +40 -0
- package/src/models/ListPoliciesResponseBody.ts +99 -0
- package/src/models/UpdateAndAttachPolicyRequest.ts +78 -0
- package/src/models/UpdateAndAttachPolicyResponse.ts +40 -0
- package/src/models/UpdateAndAttachPolicyResponseBody.ts +45 -0
- package/src/models/model.ts +11 -0
package/src/client.ts
CHANGED
|
@@ -184,6 +184,79 @@ export default class Client extends OpenApi {
|
|
|
184
184
|
return await this.changeResourceGroupWithOptions(request, headers, runtime);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
/**
|
|
188
|
+
* CreateAndAttachPolicy
|
|
189
|
+
*
|
|
190
|
+
* @param request - CreateAndAttachPolicyRequest
|
|
191
|
+
* @param headers - map
|
|
192
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
193
|
+
* @returns CreateAndAttachPolicyResponse
|
|
194
|
+
*/
|
|
195
|
+
async createAndAttachPolicyWithOptions(request: $_model.CreateAndAttachPolicyRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.CreateAndAttachPolicyResponse> {
|
|
196
|
+
request.validate();
|
|
197
|
+
let body : {[key: string ]: any} = { };
|
|
198
|
+
if (!$dara.isNull(request.attachResourceIds)) {
|
|
199
|
+
body["attachResourceIds"] = request.attachResourceIds;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (!$dara.isNull(request.attachResourceType)) {
|
|
203
|
+
body["attachResourceType"] = request.attachResourceType;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (!$dara.isNull(request.className)) {
|
|
207
|
+
body["className"] = request.className;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (!$dara.isNull(request.config)) {
|
|
211
|
+
body["config"] = request.config;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (!$dara.isNull(request.description)) {
|
|
215
|
+
body["description"] = request.description;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if (!$dara.isNull(request.environmentId)) {
|
|
219
|
+
body["environmentId"] = request.environmentId;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (!$dara.isNull(request.gatewayId)) {
|
|
223
|
+
body["gatewayId"] = request.gatewayId;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (!$dara.isNull(request.name)) {
|
|
227
|
+
body["name"] = request.name;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
231
|
+
headers: headers,
|
|
232
|
+
body: OpenApiUtil.parseToMap(body),
|
|
233
|
+
});
|
|
234
|
+
let params = new $OpenApiUtil.Params({
|
|
235
|
+
action: "CreateAndAttachPolicy",
|
|
236
|
+
version: "2024-03-27",
|
|
237
|
+
protocol: "HTTPS",
|
|
238
|
+
pathname: `/v1/policies`,
|
|
239
|
+
method: "POST",
|
|
240
|
+
authType: "AK",
|
|
241
|
+
style: "ROA",
|
|
242
|
+
reqBodyType: "json",
|
|
243
|
+
bodyType: "json",
|
|
244
|
+
});
|
|
245
|
+
return $dara.cast<$_model.CreateAndAttachPolicyResponse>(await this.callApi(params, req, runtime), new $_model.CreateAndAttachPolicyResponse({}));
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* CreateAndAttachPolicy
|
|
250
|
+
*
|
|
251
|
+
* @param request - CreateAndAttachPolicyRequest
|
|
252
|
+
* @returns CreateAndAttachPolicyResponse
|
|
253
|
+
*/
|
|
254
|
+
async createAndAttachPolicy(request: $_model.CreateAndAttachPolicyRequest): Promise<$_model.CreateAndAttachPolicyResponse> {
|
|
255
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
256
|
+
let headers : {[key: string ]: string} = { };
|
|
257
|
+
return await this.createAndAttachPolicyWithOptions(request, headers, runtime);
|
|
258
|
+
}
|
|
259
|
+
|
|
187
260
|
/**
|
|
188
261
|
* 创建消费者
|
|
189
262
|
*
|
|
@@ -3081,6 +3154,71 @@ export default class Client extends OpenApi {
|
|
|
3081
3154
|
return await this.listPluginsWithOptions(request, headers, runtime);
|
|
3082
3155
|
}
|
|
3083
3156
|
|
|
3157
|
+
/**
|
|
3158
|
+
* ListPolicies
|
|
3159
|
+
*
|
|
3160
|
+
* @param request - ListPoliciesRequest
|
|
3161
|
+
* @param headers - map
|
|
3162
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
3163
|
+
* @returns ListPoliciesResponse
|
|
3164
|
+
*/
|
|
3165
|
+
async listPoliciesWithOptions(request: $_model.ListPoliciesRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.ListPoliciesResponse> {
|
|
3166
|
+
request.validate();
|
|
3167
|
+
let query : {[key: string ]: any} = { };
|
|
3168
|
+
if (!$dara.isNull(request.attachResourceId)) {
|
|
3169
|
+
query["attachResourceId"] = request.attachResourceId;
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
if (!$dara.isNull(request.attachResourceType)) {
|
|
3173
|
+
query["attachResourceType"] = request.attachResourceType;
|
|
3174
|
+
}
|
|
3175
|
+
|
|
3176
|
+
if (!$dara.isNull(request.environmentId)) {
|
|
3177
|
+
query["environmentId"] = request.environmentId;
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3180
|
+
if (!$dara.isNull(request.gatewayId)) {
|
|
3181
|
+
query["gatewayId"] = request.gatewayId;
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3184
|
+
if (!$dara.isNull(request.withAttachments)) {
|
|
3185
|
+
query["withAttachments"] = request.withAttachments;
|
|
3186
|
+
}
|
|
3187
|
+
|
|
3188
|
+
if (!$dara.isNull(request.withSystemPolicy)) {
|
|
3189
|
+
query["withSystemPolicy"] = request.withSystemPolicy;
|
|
3190
|
+
}
|
|
3191
|
+
|
|
3192
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
3193
|
+
headers: headers,
|
|
3194
|
+
query: OpenApiUtil.query(query),
|
|
3195
|
+
});
|
|
3196
|
+
let params = new $OpenApiUtil.Params({
|
|
3197
|
+
action: "ListPolicies",
|
|
3198
|
+
version: "2024-03-27",
|
|
3199
|
+
protocol: "HTTPS",
|
|
3200
|
+
pathname: `/v1/policies`,
|
|
3201
|
+
method: "GET",
|
|
3202
|
+
authType: "AK",
|
|
3203
|
+
style: "ROA",
|
|
3204
|
+
reqBodyType: "json",
|
|
3205
|
+
bodyType: "json",
|
|
3206
|
+
});
|
|
3207
|
+
return $dara.cast<$_model.ListPoliciesResponse>(await this.callApi(params, req, runtime), new $_model.ListPoliciesResponse({}));
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3210
|
+
/**
|
|
3211
|
+
* ListPolicies
|
|
3212
|
+
*
|
|
3213
|
+
* @param request - ListPoliciesRequest
|
|
3214
|
+
* @returns ListPoliciesResponse
|
|
3215
|
+
*/
|
|
3216
|
+
async listPolicies(request: $_model.ListPoliciesRequest): Promise<$_model.ListPoliciesResponse> {
|
|
3217
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
3218
|
+
let headers : {[key: string ]: string} = { };
|
|
3219
|
+
return await this.listPoliciesWithOptions(request, headers, runtime);
|
|
3220
|
+
}
|
|
3221
|
+
|
|
3084
3222
|
/**
|
|
3085
3223
|
* ListPolicyClasses
|
|
3086
3224
|
*
|
|
@@ -3523,6 +3661,75 @@ export default class Client extends OpenApi {
|
|
|
3523
3661
|
return await this.undeployHttpApiWithOptions(httpApiId, request, headers, runtime);
|
|
3524
3662
|
}
|
|
3525
3663
|
|
|
3664
|
+
/**
|
|
3665
|
+
* UpdateAndAttachPolicy
|
|
3666
|
+
*
|
|
3667
|
+
* @param request - UpdateAndAttachPolicyRequest
|
|
3668
|
+
* @param headers - map
|
|
3669
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
3670
|
+
* @returns UpdateAndAttachPolicyResponse
|
|
3671
|
+
*/
|
|
3672
|
+
async updateAndAttachPolicyWithOptions(policyId: string, request: $_model.UpdateAndAttachPolicyRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.UpdateAndAttachPolicyResponse> {
|
|
3673
|
+
request.validate();
|
|
3674
|
+
let body : {[key: string ]: any} = { };
|
|
3675
|
+
if (!$dara.isNull(request.attachResourceIds)) {
|
|
3676
|
+
body["attachResourceIds"] = request.attachResourceIds;
|
|
3677
|
+
}
|
|
3678
|
+
|
|
3679
|
+
if (!$dara.isNull(request.attachResourceType)) {
|
|
3680
|
+
body["attachResourceType"] = request.attachResourceType;
|
|
3681
|
+
}
|
|
3682
|
+
|
|
3683
|
+
if (!$dara.isNull(request.config)) {
|
|
3684
|
+
body["config"] = request.config;
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
if (!$dara.isNull(request.description)) {
|
|
3688
|
+
body["description"] = request.description;
|
|
3689
|
+
}
|
|
3690
|
+
|
|
3691
|
+
if (!$dara.isNull(request.environmentId)) {
|
|
3692
|
+
body["environmentId"] = request.environmentId;
|
|
3693
|
+
}
|
|
3694
|
+
|
|
3695
|
+
if (!$dara.isNull(request.gatewayId)) {
|
|
3696
|
+
body["gatewayId"] = request.gatewayId;
|
|
3697
|
+
}
|
|
3698
|
+
|
|
3699
|
+
if (!$dara.isNull(request.name)) {
|
|
3700
|
+
body["name"] = request.name;
|
|
3701
|
+
}
|
|
3702
|
+
|
|
3703
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
3704
|
+
headers: headers,
|
|
3705
|
+
body: OpenApiUtil.parseToMap(body),
|
|
3706
|
+
});
|
|
3707
|
+
let params = new $OpenApiUtil.Params({
|
|
3708
|
+
action: "UpdateAndAttachPolicy",
|
|
3709
|
+
version: "2024-03-27",
|
|
3710
|
+
protocol: "HTTPS",
|
|
3711
|
+
pathname: `/v1/policies/${$dara.URL.percentEncode(policyId)}`,
|
|
3712
|
+
method: "PUT",
|
|
3713
|
+
authType: "AK",
|
|
3714
|
+
style: "ROA",
|
|
3715
|
+
reqBodyType: "json",
|
|
3716
|
+
bodyType: "json",
|
|
3717
|
+
});
|
|
3718
|
+
return $dara.cast<$_model.UpdateAndAttachPolicyResponse>(await this.callApi(params, req, runtime), new $_model.UpdateAndAttachPolicyResponse({}));
|
|
3719
|
+
}
|
|
3720
|
+
|
|
3721
|
+
/**
|
|
3722
|
+
* UpdateAndAttachPolicy
|
|
3723
|
+
*
|
|
3724
|
+
* @param request - UpdateAndAttachPolicyRequest
|
|
3725
|
+
* @returns UpdateAndAttachPolicyResponse
|
|
3726
|
+
*/
|
|
3727
|
+
async updateAndAttachPolicy(policyId: string, request: $_model.UpdateAndAttachPolicyRequest): Promise<$_model.UpdateAndAttachPolicyResponse> {
|
|
3728
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
3729
|
+
let headers : {[key: string ]: string} = { };
|
|
3730
|
+
return await this.updateAndAttachPolicyWithOptions(policyId, request, headers, runtime);
|
|
3731
|
+
}
|
|
3732
|
+
|
|
3526
3733
|
/**
|
|
3527
3734
|
* 更新消费者
|
|
3528
3735
|
*
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class CreateAndAttachPolicyRequest extends $dara.Model {
|
|
6
|
+
/**
|
|
7
|
+
* @remarks
|
|
8
|
+
* This parameter is required.
|
|
9
|
+
*/
|
|
10
|
+
attachResourceIds?: string[];
|
|
11
|
+
/**
|
|
12
|
+
* @remarks
|
|
13
|
+
* This parameter is required.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* HttpApi
|
|
17
|
+
*/
|
|
18
|
+
attachResourceType?: string;
|
|
19
|
+
/**
|
|
20
|
+
* @remarks
|
|
21
|
+
* This parameter is required.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* IpAccessControl
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* @remarks
|
|
29
|
+
* This parameter is required.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* {\\"enable\\":false}
|
|
33
|
+
*/
|
|
34
|
+
config?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @example
|
|
38
|
+
* env-cq7l5s5lhtgi6qasrdc0
|
|
39
|
+
*/
|
|
40
|
+
environmentId?: string;
|
|
41
|
+
/**
|
|
42
|
+
* @example
|
|
43
|
+
* gw-cq7l5s5lhtgi6qasrdc0
|
|
44
|
+
*/
|
|
45
|
+
gatewayId?: string;
|
|
46
|
+
/**
|
|
47
|
+
* @example
|
|
48
|
+
* test
|
|
49
|
+
*/
|
|
50
|
+
name?: string;
|
|
51
|
+
static names(): { [key: string]: string } {
|
|
52
|
+
return {
|
|
53
|
+
attachResourceIds: 'attachResourceIds',
|
|
54
|
+
attachResourceType: 'attachResourceType',
|
|
55
|
+
className: 'className',
|
|
56
|
+
config: 'config',
|
|
57
|
+
description: 'description',
|
|
58
|
+
environmentId: 'environmentId',
|
|
59
|
+
gatewayId: 'gatewayId',
|
|
60
|
+
name: 'name',
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
static types(): { [key: string]: any } {
|
|
65
|
+
return {
|
|
66
|
+
attachResourceIds: { 'type': 'array', 'itemType': 'string' },
|
|
67
|
+
attachResourceType: 'string',
|
|
68
|
+
className: 'string',
|
|
69
|
+
config: 'string',
|
|
70
|
+
description: 'string',
|
|
71
|
+
environmentId: 'string',
|
|
72
|
+
gatewayId: 'string',
|
|
73
|
+
name: 'string',
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
validate() {
|
|
78
|
+
if(Array.isArray(this.attachResourceIds)) {
|
|
79
|
+
$dara.Model.validateArray(this.attachResourceIds);
|
|
80
|
+
}
|
|
81
|
+
super.validate();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
constructor(map?: { [key: string]: any }) {
|
|
85
|
+
super(map);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
import { CreateAndAttachPolicyResponseBody } from "./CreateAndAttachPolicyResponseBody";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class CreateAndAttachPolicyResponse extends $dara.Model {
|
|
7
|
+
headers?: { [key: string]: string };
|
|
8
|
+
statusCode?: number;
|
|
9
|
+
body?: CreateAndAttachPolicyResponseBody;
|
|
10
|
+
static names(): { [key: string]: string } {
|
|
11
|
+
return {
|
|
12
|
+
headers: 'headers',
|
|
13
|
+
statusCode: 'statusCode',
|
|
14
|
+
body: 'body',
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static types(): { [key: string]: any } {
|
|
19
|
+
return {
|
|
20
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
21
|
+
statusCode: 'number',
|
|
22
|
+
body: CreateAndAttachPolicyResponseBody,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
validate() {
|
|
27
|
+
if(this.headers) {
|
|
28
|
+
$dara.Model.validateMap(this.headers);
|
|
29
|
+
}
|
|
30
|
+
if(this.body && typeof (this.body as any).validate === 'function') {
|
|
31
|
+
(this.body as any).validate();
|
|
32
|
+
}
|
|
33
|
+
super.validate();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
constructor(map?: { [key: string]: any }) {
|
|
37
|
+
super(map);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
import { Attachment } from "./Attachment";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class CreateAndAttachPolicyResponseBodyData extends $dara.Model {
|
|
7
|
+
attachment?: Attachment;
|
|
8
|
+
/**
|
|
9
|
+
* @example
|
|
10
|
+
* p-cq7l5s5lhtgi6qasrdc0
|
|
11
|
+
*/
|
|
12
|
+
policyId?: string;
|
|
13
|
+
static names(): { [key: string]: string } {
|
|
14
|
+
return {
|
|
15
|
+
attachment: 'attachment',
|
|
16
|
+
policyId: 'policyId',
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static types(): { [key: string]: any } {
|
|
21
|
+
return {
|
|
22
|
+
attachment: Attachment,
|
|
23
|
+
policyId: 'string',
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
validate() {
|
|
28
|
+
if(this.attachment && typeof (this.attachment as any).validate === 'function') {
|
|
29
|
+
(this.attachment as any).validate();
|
|
30
|
+
}
|
|
31
|
+
super.validate();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
constructor(map?: { [key: string]: any }) {
|
|
35
|
+
super(map);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export class CreateAndAttachPolicyResponseBody extends $dara.Model {
|
|
40
|
+
/**
|
|
41
|
+
* @example
|
|
42
|
+
* Ok
|
|
43
|
+
*/
|
|
44
|
+
code?: string;
|
|
45
|
+
data?: CreateAndAttachPolicyResponseBodyData;
|
|
46
|
+
/**
|
|
47
|
+
* @example
|
|
48
|
+
* success
|
|
49
|
+
*/
|
|
50
|
+
message?: string;
|
|
51
|
+
/**
|
|
52
|
+
* @example
|
|
53
|
+
* 585657D2-1C20-5B8A-AF17-D727C6490BE4
|
|
54
|
+
*/
|
|
55
|
+
requestId?: string;
|
|
56
|
+
static names(): { [key: string]: string } {
|
|
57
|
+
return {
|
|
58
|
+
code: 'code',
|
|
59
|
+
data: 'data',
|
|
60
|
+
message: 'message',
|
|
61
|
+
requestId: 'requestId',
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
static types(): { [key: string]: any } {
|
|
66
|
+
return {
|
|
67
|
+
code: 'string',
|
|
68
|
+
data: CreateAndAttachPolicyResponseBodyData,
|
|
69
|
+
message: 'string',
|
|
70
|
+
requestId: 'string',
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
validate() {
|
|
75
|
+
if(this.data && typeof (this.data as any).validate === 'function') {
|
|
76
|
+
(this.data as any).validate();
|
|
77
|
+
}
|
|
78
|
+
super.validate();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
constructor(map?: { [key: string]: any }) {
|
|
82
|
+
super(map);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class ListPoliciesRequest extends $dara.Model {
|
|
6
|
+
/**
|
|
7
|
+
* @example
|
|
8
|
+
* api-cq7l5s5lhtgi6qasrdc0
|
|
9
|
+
*/
|
|
10
|
+
attachResourceId?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @example
|
|
13
|
+
* HttpApi
|
|
14
|
+
*/
|
|
15
|
+
attachResourceType?: string;
|
|
16
|
+
/**
|
|
17
|
+
* @example
|
|
18
|
+
* env-cq7l5s5lhtgi6qasrdc0
|
|
19
|
+
*/
|
|
20
|
+
environmentId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @example
|
|
23
|
+
* gw-cq2fm65lhtgm9nrrl7ag
|
|
24
|
+
*/
|
|
25
|
+
gatewayId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* @example
|
|
28
|
+
* false
|
|
29
|
+
*/
|
|
30
|
+
withAttachments?: boolean;
|
|
31
|
+
withSystemPolicy?: boolean;
|
|
32
|
+
static names(): { [key: string]: string } {
|
|
33
|
+
return {
|
|
34
|
+
attachResourceId: 'attachResourceId',
|
|
35
|
+
attachResourceType: 'attachResourceType',
|
|
36
|
+
environmentId: 'environmentId',
|
|
37
|
+
gatewayId: 'gatewayId',
|
|
38
|
+
withAttachments: 'withAttachments',
|
|
39
|
+
withSystemPolicy: 'withSystemPolicy',
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static types(): { [key: string]: any } {
|
|
44
|
+
return {
|
|
45
|
+
attachResourceId: 'string',
|
|
46
|
+
attachResourceType: 'string',
|
|
47
|
+
environmentId: 'string',
|
|
48
|
+
gatewayId: 'string',
|
|
49
|
+
withAttachments: 'boolean',
|
|
50
|
+
withSystemPolicy: 'boolean',
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
validate() {
|
|
55
|
+
super.validate();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
constructor(map?: { [key: string]: any }) {
|
|
59
|
+
super(map);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
import { ListPoliciesResponseBody } from "./ListPoliciesResponseBody";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class ListPoliciesResponse extends $dara.Model {
|
|
7
|
+
headers?: { [key: string]: string };
|
|
8
|
+
statusCode?: number;
|
|
9
|
+
body?: ListPoliciesResponseBody;
|
|
10
|
+
static names(): { [key: string]: string } {
|
|
11
|
+
return {
|
|
12
|
+
headers: 'headers',
|
|
13
|
+
statusCode: 'statusCode',
|
|
14
|
+
body: 'body',
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static types(): { [key: string]: any } {
|
|
19
|
+
return {
|
|
20
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
21
|
+
statusCode: 'number',
|
|
22
|
+
body: ListPoliciesResponseBody,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
validate() {
|
|
27
|
+
if(this.headers) {
|
|
28
|
+
$dara.Model.validateMap(this.headers);
|
|
29
|
+
}
|
|
30
|
+
if(this.body && typeof (this.body as any).validate === 'function') {
|
|
31
|
+
(this.body as any).validate();
|
|
32
|
+
}
|
|
33
|
+
super.validate();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
constructor(map?: { [key: string]: any }) {
|
|
37
|
+
super(map);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
import { PolicyInfo } from "./PolicyInfo";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class ListPoliciesResponseBodyData extends $dara.Model {
|
|
7
|
+
items?: PolicyInfo[];
|
|
8
|
+
/**
|
|
9
|
+
* @example
|
|
10
|
+
* 1
|
|
11
|
+
*/
|
|
12
|
+
pageNumber?: number;
|
|
13
|
+
/**
|
|
14
|
+
* @example
|
|
15
|
+
* 10
|
|
16
|
+
*/
|
|
17
|
+
pageSize?: number;
|
|
18
|
+
/**
|
|
19
|
+
* @example
|
|
20
|
+
* 18
|
|
21
|
+
*/
|
|
22
|
+
totalSize?: number;
|
|
23
|
+
static names(): { [key: string]: string } {
|
|
24
|
+
return {
|
|
25
|
+
items: 'items',
|
|
26
|
+
pageNumber: 'pageNumber',
|
|
27
|
+
pageSize: 'pageSize',
|
|
28
|
+
totalSize: 'totalSize',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static types(): { [key: string]: any } {
|
|
33
|
+
return {
|
|
34
|
+
items: { 'type': 'array', 'itemType': PolicyInfo },
|
|
35
|
+
pageNumber: 'number',
|
|
36
|
+
pageSize: 'number',
|
|
37
|
+
totalSize: 'number',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
validate() {
|
|
42
|
+
if(Array.isArray(this.items)) {
|
|
43
|
+
$dara.Model.validateArray(this.items);
|
|
44
|
+
}
|
|
45
|
+
super.validate();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
constructor(map?: { [key: string]: any }) {
|
|
49
|
+
super(map);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export class ListPoliciesResponseBody extends $dara.Model {
|
|
54
|
+
/**
|
|
55
|
+
* @example
|
|
56
|
+
* Ok
|
|
57
|
+
*/
|
|
58
|
+
code?: string;
|
|
59
|
+
data?: ListPoliciesResponseBodyData;
|
|
60
|
+
/**
|
|
61
|
+
* @example
|
|
62
|
+
* success
|
|
63
|
+
*/
|
|
64
|
+
message?: string;
|
|
65
|
+
/**
|
|
66
|
+
* @example
|
|
67
|
+
* 393E2630-DBE7-5221-AB35-9E740675491A
|
|
68
|
+
*/
|
|
69
|
+
requestId?: string;
|
|
70
|
+
static names(): { [key: string]: string } {
|
|
71
|
+
return {
|
|
72
|
+
code: 'code',
|
|
73
|
+
data: 'data',
|
|
74
|
+
message: 'message',
|
|
75
|
+
requestId: 'requestId',
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static types(): { [key: string]: any } {
|
|
80
|
+
return {
|
|
81
|
+
code: 'string',
|
|
82
|
+
data: ListPoliciesResponseBodyData,
|
|
83
|
+
message: 'string',
|
|
84
|
+
requestId: 'string',
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
validate() {
|
|
89
|
+
if(this.data && typeof (this.data as any).validate === 'function') {
|
|
90
|
+
(this.data as any).validate();
|
|
91
|
+
}
|
|
92
|
+
super.validate();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
constructor(map?: { [key: string]: any }) {
|
|
96
|
+
super(map);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|