Skip to content

Commit 5cf01eb

Browse files
committed
Generated ts 2018-08-13 for cas.
1 parent f8010ea commit 5cf01eb

11 files changed

+489
-0
lines changed

cas-20180813/LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) 2009-present, Alibaba Cloud All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

cas-20180813/README-CN.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[English](README.md) | 简体中文
2+
3+
![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg)
4+
5+
# Alibaba Cloud cas SDK for NodeJS
6+
7+
## 安装
8+
你可以使用 npm 来管理你的依赖,并通过下面命令安装依赖并写入 package.json
9+
10+
```sh
11+
npm install @alicloud/cas20180813 -S
12+
```
13+
14+
## 问题
15+
16+
[提交 Issue](https://github.com/aliyun/alibabacloud-typescript-sdk/issues/new),不符合指南的问题可能会立即关闭。
17+
18+
## 使用说明
19+
20+
[使用文档](https://github.com/aliyun/alibabacloud-typescript-sdk/blob/master/docs/Usage-CN.md#%E5%BF%AB%E9%80%9F%E4%BD%BF%E7%94%A8)
21+
22+
## 相关
23+
24+
* [最新源码](https://github.com/aliyun/alibabacloud-typescript-sdk/)
25+
26+
## 许可证
27+
28+
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
29+
30+
Copyright (c) 2009-present, Alibaba Cloud All rights reserved.

cas-20180813/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
English | [简体中文](README-CN.md)
2+
![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg)
3+
4+
# Alibaba Cloud cas SDK for NodeJS
5+
6+
## Installation
7+
If you use `npm` to manage your dependence, you can use the following command:
8+
9+
```sh
10+
npm install @alicloud/cas20180813 -S
11+
```
12+
13+
## Issues
14+
[Opening an Issue](https://github.com/aliyun/alibabacloud-typescript-sdk/issues/new), Issues not conforming to the guidelines may be closed immediately.
15+
16+
## Usage
17+
[Usage Document](https://github.com/aliyun/alibabacloud-typescript-sdk/blob/master/docs/Usage-EN.md#quick-examples)
18+
19+
## References
20+
* [Latest Release](https://github.com/aliyun/alibabacloud-typescript-sdk/)
21+
22+
## License
23+
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
24+
25+
Copyright (c) 2009-present, Alibaba Cloud All rights reserved.

cas-20180813/package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "@alicloud/cas20180813",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "dist/client.js",
6+
"scripts": {
7+
"test": "mocha --reporter spec --timeout 3000 test/*.test.js",
8+
"test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test",
9+
"build": "tsc",
10+
"prepublishOnly": "tsc"
11+
},
12+
"author": "Alibaba Cloud SDK",
13+
"license": "Apache-2.0",
14+
"devDependencies": {
15+
"@types/node": "^16.0.0",
16+
"nyc": "^15.0.0",
17+
"source-map-support": "^0.5.16",
18+
"ts-node": "^10.0.0",
19+
"typescript": "^5"
20+
},
21+
"dependencies": {
22+
"@darabonba/typescript": "^1.0.0",
23+
"@alicloud/openapi-core": "^1.0.0"
24+
},
25+
"files": [
26+
"dist",
27+
"src"
28+
]
29+
}

cas-20180813/src/client.ts

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
import OpenApi from '@alicloud/openapi-core';
4+
import { OpenApiUtil, $OpenApiUtil }from '@alicloud/openapi-core';
5+
6+
7+
import * as $_model from './models/model';
8+
export * from './models/model';
9+
10+
export default class Client extends OpenApi {
11+
12+
constructor(config: $OpenApiUtil.Config) {
13+
super(config);
14+
this._endpointRule = "regional";
15+
this._endpointMap = {
16+
'cn-hangzhou': "cas.aliyuncs.com",
17+
'ap-northeast-2-pop': "cas.aliyuncs.com",
18+
'ap-southeast-3': "cas.aliyuncs.com",
19+
'ap-southeast-5': "cas.aliyuncs.com",
20+
'cn-beijing': "cas.aliyuncs.com",
21+
'cn-beijing-finance-1': "cas.aliyuncs.com",
22+
'cn-beijing-finance-pop': "cas.aliyuncs.com",
23+
'cn-beijing-gov-1': "cas.aliyuncs.com",
24+
'cn-beijing-nu16-b01': "cas.aliyuncs.com",
25+
'cn-chengdu': "cas.aliyuncs.com",
26+
'cn-edge-1': "cas.aliyuncs.com",
27+
'cn-fujian': "cas.aliyuncs.com",
28+
'cn-haidian-cm12-c01': "cas.aliyuncs.com",
29+
'cn-hangzhou-bj-b01': "cas.aliyuncs.com",
30+
'cn-hangzhou-finance': "cas.aliyuncs.com",
31+
'cn-hangzhou-internal-prod-1': "cas.aliyuncs.com",
32+
'cn-hangzhou-internal-test-1': "cas.aliyuncs.com",
33+
'cn-hangzhou-internal-test-2': "cas.aliyuncs.com",
34+
'cn-hangzhou-internal-test-3': "cas.aliyuncs.com",
35+
'cn-hangzhou-test-306': "cas.aliyuncs.com",
36+
'cn-hongkong': "cas.aliyuncs.com",
37+
'cn-hongkong-finance-pop': "cas.aliyuncs.com",
38+
'cn-huhehaote': "cas.aliyuncs.com",
39+
'cn-huhehaote-nebula-1': "cas.aliyuncs.com",
40+
'cn-north-2-gov-1': "cas.aliyuncs.com",
41+
'cn-qingdao': "cas.aliyuncs.com",
42+
'cn-qingdao-nebula': "cas.aliyuncs.com",
43+
'cn-shanghai': "cas.aliyuncs.com",
44+
'cn-shanghai-et15-b01': "cas.aliyuncs.com",
45+
'cn-shanghai-et2-b01': "cas.aliyuncs.com",
46+
'cn-shanghai-finance-1': "cas.aliyuncs.com",
47+
'cn-shanghai-inner': "cas.aliyuncs.com",
48+
'cn-shanghai-internal-test-1': "cas.aliyuncs.com",
49+
'cn-shenzhen': "cas.aliyuncs.com",
50+
'cn-shenzhen-finance-1': "cas.aliyuncs.com",
51+
'cn-shenzhen-inner': "cas.aliyuncs.com",
52+
'cn-shenzhen-st4-d01': "cas.aliyuncs.com",
53+
'cn-shenzhen-su18-b01': "cas.aliyuncs.com",
54+
'cn-wuhan': "cas.aliyuncs.com",
55+
'cn-wulanchabu': "cas.aliyuncs.com",
56+
'cn-yushanfang': "cas.aliyuncs.com",
57+
'cn-zhangbei': "cas.aliyuncs.com",
58+
'cn-zhangbei-na61-b01': "cas.aliyuncs.com",
59+
'cn-zhangjiakou': "cas.aliyuncs.com",
60+
'cn-zhangjiakou-na62-a01': "cas.aliyuncs.com",
61+
'cn-zhengzhou-nebula-1': "cas.aliyuncs.com",
62+
'eu-west-1': "cas.aliyuncs.com",
63+
'eu-west-1-oxs': "cas.aliyuncs.com",
64+
'rus-west-1-pop': "cas.aliyuncs.com",
65+
'us-east-1': "cas.aliyuncs.com",
66+
'us-west-1': "cas.aliyuncs.com",
67+
};
68+
this.checkConfig(config);
69+
this._endpoint = this.getEndpoint("cas", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
70+
}
71+
72+
73+
getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string {
74+
if (!$dara.isNull(endpoint)) {
75+
return endpoint;
76+
}
77+
78+
if (!$dara.isNull(endpointMap) && !$dara.isNull(endpointMap[regionId])) {
79+
return endpointMap[regionId];
80+
}
81+
82+
return OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
83+
}
84+
85+
/**
86+
* 获取私有证书实例
87+
*
88+
* @param request - ListPCAInstanceRequest
89+
* @param runtime - runtime options for this request RuntimeOptions
90+
* @returns ListPCAInstanceResponse
91+
*/
92+
async listPCAInstanceWithOptions(request: $_model.ListPCAInstanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ListPCAInstanceResponse> {
93+
request.validate();
94+
let query = { };
95+
if (!$dara.isNull(request.currentPage)) {
96+
query["CurrentPage"] = request.currentPage;
97+
}
98+
99+
if (!$dara.isNull(request.showSize)) {
100+
query["ShowSize"] = request.showSize;
101+
}
102+
103+
if (!$dara.isNull(request.type)) {
104+
query["Type"] = request.type;
105+
}
106+
107+
let req = new $OpenApiUtil.OpenApiRequest({
108+
query: OpenApiUtil.query(query),
109+
});
110+
let params = new $OpenApiUtil.Params({
111+
action: "ListPCAInstance",
112+
version: "2018-08-13",
113+
protocol: "HTTPS",
114+
pathname: "/",
115+
method: "POST",
116+
authType: "AK",
117+
style: "RPC",
118+
reqBodyType: "formData",
119+
bodyType: "json",
120+
});
121+
return $dara.cast<$_model.ListPCAInstanceResponse>(await this.callApi(params, req, runtime), new $_model.ListPCAInstanceResponse({}));
122+
}
123+
124+
/**
125+
* 获取私有证书实例
126+
*
127+
* @param request - ListPCAInstanceRequest
128+
* @returns ListPCAInstanceResponse
129+
*/
130+
async listPCAInstance(request: $_model.ListPCAInstanceRequest): Promise<$_model.ListPCAInstanceResponse> {
131+
let runtime = new $dara.RuntimeOptions({ });
132+
return await this.listPCAInstanceWithOptions(request, runtime);
133+
}
134+
135+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class ListPCAInstanceRequest extends $dara.Model {
6+
/**
7+
* @example
8+
* 1
9+
*/
10+
currentPage?: number;
11+
/**
12+
* @example
13+
* 10
14+
*/
15+
showSize?: number;
16+
/**
17+
* @example
18+
* iTrusChina
19+
*/
20+
type?: string;
21+
static names(): { [key: string]: string } {
22+
return {
23+
currentPage: 'CurrentPage',
24+
showSize: 'ShowSize',
25+
type: 'Type',
26+
};
27+
}
28+
29+
static types(): { [key: string]: any } {
30+
return {
31+
currentPage: 'number',
32+
showSize: 'number',
33+
type: 'string',
34+
};
35+
}
36+
37+
validate() {
38+
super.validate();
39+
}
40+
41+
constructor(map?: { [key: string]: any }) {
42+
super(map);
43+
}
44+
}
45+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
import { ListPCAInstanceResponseBody } from "./ListPcainstanceResponseBody";
4+
5+
6+
export class ListPCAInstanceResponse extends $dara.Model {
7+
headers?: { [key: string]: string };
8+
statusCode?: number;
9+
body?: ListPCAInstanceResponseBody;
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: ListPCAInstanceResponseBody,
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+
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
import { ListPCAInstanceResponseBodyPCAInstanceList } from "./ListPcainstanceResponseBodyPcainstanceList";
4+
5+
6+
export class ListPCAInstanceResponseBody extends $dara.Model {
7+
/**
8+
* @example
9+
* 1
10+
*/
11+
currentPage?: number;
12+
PCAInstanceList?: ListPCAInstanceResponseBodyPCAInstanceList[];
13+
/**
14+
* @example
15+
* EECA10D5-BD0F-4EF1-B3EA-B4578E5C6F8E
16+
*/
17+
requestId?: string;
18+
/**
19+
* @example
20+
* 20
21+
*/
22+
showSize?: number;
23+
/**
24+
* @example
25+
* 3
26+
*/
27+
totalCount?: number;
28+
static names(): { [key: string]: string } {
29+
return {
30+
currentPage: 'CurrentPage',
31+
PCAInstanceList: 'PCAInstanceList',
32+
requestId: 'RequestId',
33+
showSize: 'ShowSize',
34+
totalCount: 'TotalCount',
35+
};
36+
}
37+
38+
static types(): { [key: string]: any } {
39+
return {
40+
currentPage: 'number',
41+
PCAInstanceList: { 'type': 'array', 'itemType': ListPCAInstanceResponseBodyPCAInstanceList },
42+
requestId: 'string',
43+
showSize: 'number',
44+
totalCount: 'number',
45+
};
46+
}
47+
48+
validate() {
49+
if(Array.isArray(this.PCAInstanceList)) {
50+
$dara.Model.validateArray(this.PCAInstanceList);
51+
}
52+
super.validate();
53+
}
54+
55+
constructor(map?: { [key: string]: any }) {
56+
super(map);
57+
}
58+
}
59+

0 commit comments

Comments
 (0)