Skip to content

Commit 092131f

Browse files
committed
Generated ts 2020-02-02 for Ft.
1 parent 65736b4 commit 092131f

File tree

3 files changed

+304
-0
lines changed

3 files changed

+304
-0
lines changed

ft-20200202/package.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "@alicloud/ft20200202-test",
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": "^12.12.26",
16+
"nyc": "^15.0.0",
17+
"source-map-support": "^0.5.16",
18+
"ts-node": "^8.6.2",
19+
"typescript": "^3.7.5"
20+
},
21+
"dependencies": {
22+
"@alicloud/tea-typescript": "latest",
23+
"@alicloud/tea-util": "^1.4.0",
24+
"@alicloud/openapi-client": "^0.2.1",
25+
"@alicloud/endpoint-util": "^0.0.1"
26+
},
27+
"files": [
28+
"dist",
29+
"src"
30+
]
31+
}

ft-20200202/src/client.ts

Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
// This file is auto-generated, don't edit it
2+
/**
3+
*
4+
*/
5+
import Util, * as $Util from '@alicloud/tea-util';
6+
import OpenApi, * as $OpenApi from '@alicloud/openapi-client';
7+
import EndpointUtil from '@alicloud/endpoint-util';
8+
import * as $tea from '@alicloud/tea-typescript';
9+
10+
export class DefaultDegradeRuleRequest extends $tea.Model {
11+
request?: string;
12+
response?: string;
13+
RT?: number;
14+
responseSize?: number;
15+
static names(): { [key: string]: string } {
16+
return {
17+
request: 'Request',
18+
response: 'Response',
19+
RT: 'RT',
20+
responseSize: 'ResponseSize',
21+
};
22+
}
23+
24+
static types(): { [key: string]: any } {
25+
return {
26+
request: 'string',
27+
response: 'string',
28+
RT: 'number',
29+
responseSize: 'number',
30+
};
31+
}
32+
33+
constructor(map?: { [key: string]: any }) {
34+
super(map);
35+
}
36+
}
37+
38+
export class DefaultDegradeRuleResponseBody extends $tea.Model {
39+
requestId?: string;
40+
size?: string;
41+
value?: string;
42+
static names(): { [key: string]: string } {
43+
return {
44+
requestId: 'RequestId',
45+
size: 'Size',
46+
value: 'Value',
47+
};
48+
}
49+
50+
static types(): { [key: string]: any } {
51+
return {
52+
requestId: 'string',
53+
size: 'string',
54+
value: 'string',
55+
};
56+
}
57+
58+
constructor(map?: { [key: string]: any }) {
59+
super(map);
60+
}
61+
}
62+
63+
export class DefaultDegradeRuleResponse extends $tea.Model {
64+
headers: { [key: string]: string };
65+
body: DefaultDegradeRuleResponseBody;
66+
static names(): { [key: string]: string } {
67+
return {
68+
headers: 'headers',
69+
body: 'body',
70+
};
71+
}
72+
73+
static types(): { [key: string]: any } {
74+
return {
75+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
76+
body: DefaultDegradeRuleResponseBody,
77+
};
78+
}
79+
80+
constructor(map?: { [key: string]: any }) {
81+
super(map);
82+
}
83+
}
84+
85+
export class DefaultDegradeRuleTestRequest extends $tea.Model {
86+
request?: string;
87+
response?: string;
88+
RT?: number;
89+
responseSize?: number;
90+
static names(): { [key: string]: string } {
91+
return {
92+
request: 'Request',
93+
response: 'Response',
94+
RT: 'RT',
95+
responseSize: 'ResponseSize',
96+
};
97+
}
98+
99+
static types(): { [key: string]: any } {
100+
return {
101+
request: 'string',
102+
response: 'string',
103+
RT: 'number',
104+
responseSize: 'number',
105+
};
106+
}
107+
108+
constructor(map?: { [key: string]: any }) {
109+
super(map);
110+
}
111+
}
112+
113+
export class DefaultDegradeRuleTestResponseBody extends $tea.Model {
114+
requestId?: string;
115+
size?: string;
116+
value?: string;
117+
static names(): { [key: string]: string } {
118+
return {
119+
requestId: 'RequestId',
120+
size: 'Size',
121+
value: 'Value',
122+
};
123+
}
124+
125+
static types(): { [key: string]: any } {
126+
return {
127+
requestId: 'string',
128+
size: 'string',
129+
value: 'string',
130+
};
131+
}
132+
133+
constructor(map?: { [key: string]: any }) {
134+
super(map);
135+
}
136+
}
137+
138+
export class DefaultDegradeRuleTestResponse extends $tea.Model {
139+
headers: { [key: string]: string };
140+
body: DefaultDegradeRuleTestResponseBody;
141+
static names(): { [key: string]: string } {
142+
return {
143+
headers: 'headers',
144+
body: 'body',
145+
};
146+
}
147+
148+
static types(): { [key: string]: any } {
149+
return {
150+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
151+
body: DefaultDegradeRuleTestResponseBody,
152+
};
153+
}
154+
155+
constructor(map?: { [key: string]: any }) {
156+
super(map);
157+
}
158+
}
159+
160+
161+
export default class Client extends OpenApi {
162+
163+
constructor(config: $OpenApi.Config) {
164+
super(config);
165+
this._endpointRule = "regional";
166+
this._endpointMap = {
167+
'ap-northeast-2-pop': "ft.aliyuncs.com",
168+
'ap-south-1': "ft.aliyuncs.com",
169+
'ap-southeast-1': "ft.aliyuncs.com",
170+
'ap-southeast-2': "ft.aliyuncs.com",
171+
'ap-southeast-3': "ft.aliyuncs.com",
172+
'ap-southeast-5': "ft.aliyuncs.com",
173+
'cn-beijing': "ft.aliyuncs.com",
174+
'cn-beijing-finance-1': "ft.aliyuncs.com",
175+
'cn-beijing-finance-pop': "ft.aliyuncs.com",
176+
'cn-beijing-gov-1': "ft.aliyuncs.com",
177+
'cn-beijing-nu16-b01': "ft.aliyuncs.com",
178+
'cn-chengdu': "ft.aliyuncs.com",
179+
'cn-edge-1': "ft.aliyuncs.com",
180+
'cn-fujian': "ft.aliyuncs.com",
181+
'cn-haidian-cm12-c01': "ft.aliyuncs.com",
182+
'cn-hangzhou-bj-b01': "ft.aliyuncs.com",
183+
'cn-hangzhou-finance': "ft.aliyuncs.com",
184+
'cn-hangzhou-internal-prod-1': "ft.aliyuncs.com",
185+
'cn-hangzhou-internal-test-1': "ft.aliyuncs.com",
186+
'cn-hangzhou-internal-test-2': "ft.aliyuncs.com",
187+
'cn-hangzhou-internal-test-3': "ft.aliyuncs.com",
188+
'cn-hangzhou-test-306': "ft.aliyuncs.com",
189+
'cn-hongkong-finance-pop': "ft.aliyuncs.com",
190+
'cn-huhehaote': "ft.aliyuncs.com",
191+
'cn-huhehaote-nebula-1': "ft.aliyuncs.com",
192+
'cn-qingdao': "ft.aliyuncs.com",
193+
'cn-qingdao-nebula': "ft.aliyuncs.com",
194+
'cn-shanghai-et15-b01': "ft.aliyuncs.com",
195+
'cn-shanghai-et2-b01': "ft.aliyuncs.com",
196+
'cn-shanghai-finance-1': "ft.aliyuncs.com",
197+
'cn-shanghai-inner': "ft.aliyuncs.com",
198+
'cn-shanghai-internal-test-1': "ft.aliyuncs.com",
199+
'cn-shenzhen-finance-1': "ft.aliyuncs.com",
200+
'cn-shenzhen-inner': "ft.aliyuncs.com",
201+
'cn-shenzhen-st4-d01': "ft.aliyuncs.com",
202+
'cn-shenzhen-su18-b01': "ft.aliyuncs.com",
203+
'cn-wuhan': "ft.aliyuncs.com",
204+
'cn-wulanchabu': "ft.aliyuncs.com",
205+
'cn-yushanfang': "ft.aliyuncs.com",
206+
'cn-zhangbei': "ft.aliyuncs.com",
207+
'cn-zhangbei-na61-b01': "ft.aliyuncs.com",
208+
'cn-zhangjiakou-na62-a01': "ft.aliyuncs.com",
209+
'cn-zhengzhou-nebula-1': "ft.aliyuncs.com",
210+
'eu-central-1': "ft.aliyuncs.com",
211+
'eu-west-1': "ft.aliyuncs.com",
212+
'eu-west-1-oxs': "ft.aliyuncs.com",
213+
'me-east-1': "ft.aliyuncs.com",
214+
'rus-west-1-pop': "ft.aliyuncs.com",
215+
'us-west-1': "ft.aliyuncs.com",
216+
};
217+
this.checkConfig(config);
218+
this._endpoint = this.getEndpoint("ft", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
219+
}
220+
221+
222+
getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string {
223+
if (!Util.empty(endpoint)) {
224+
return endpoint;
225+
}
226+
227+
if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
228+
return endpointMap[regionId];
229+
}
230+
231+
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
232+
}
233+
234+
async defaultDegradeRuleWithOptions(request: DefaultDegradeRuleRequest, runtime: $Util.RuntimeOptions): Promise<DefaultDegradeRuleResponse> {
235+
Util.validateModel(request);
236+
let req = new $OpenApi.OpenApiRequest({
237+
body: Util.toMap(request),
238+
});
239+
return $tea.cast<DefaultDegradeRuleResponse>(await this.doRPCRequest("DefaultDegradeRule", "2020-02-02", "HTTPS", "POST", "AK", "json", req, runtime), new DefaultDegradeRuleResponse({}));
240+
}
241+
242+
async defaultDegradeRule(request: DefaultDegradeRuleRequest): Promise<DefaultDegradeRuleResponse> {
243+
let runtime = new $Util.RuntimeOptions({ });
244+
return await this.defaultDegradeRuleWithOptions(request, runtime);
245+
}
246+
247+
async defaultDegradeRuleTestWithOptions(request: DefaultDegradeRuleTestRequest, runtime: $Util.RuntimeOptions): Promise<DefaultDegradeRuleTestResponse> {
248+
Util.validateModel(request);
249+
let req = new $OpenApi.OpenApiRequest({
250+
body: Util.toMap(request),
251+
});
252+
return $tea.cast<DefaultDegradeRuleTestResponse>(await this.doRPCRequest("DefaultDegradeRuleTest", "2020-02-02", "HTTPS", "POST", "AK", "json", req, runtime), new DefaultDegradeRuleTestResponse({}));
253+
}
254+
255+
async defaultDegradeRuleTest(request: DefaultDegradeRuleTestRequest): Promise<DefaultDegradeRuleTestResponse> {
256+
let runtime = new $Util.RuntimeOptions({ });
257+
return await this.defaultDegradeRuleTestWithOptions(request, runtime);
258+
}
259+
260+
}

ft-20200202/tsconfig.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2017",
4+
"module": "commonjs",
5+
"declaration": true,
6+
"sourceMap": true,
7+
"outDir": "./dist",
8+
"esModuleInterop": true
9+
},
10+
"include": [
11+
"src/**/*"
12+
]
13+
}

0 commit comments

Comments
 (0)