Skip to content

Commit bdbf2a1

Browse files
committed
release 0.0.2-beta source code for nodejs
1 parent b931251 commit bdbf2a1

File tree

322 files changed

+20778
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

322 files changed

+20778
-18
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# 0.0.2-beta 2022-11-29
2+
3+
### G42Cloud SDK CSE
4+
5+
- _Features_
6+
- New Support CSE
7+
- _Bug Fix_
8+
- None
9+
- _Change_
10+
- None
11+
12+
### G42Cloud SDK ELB
13+
14+
- _Features_
15+
- New Support ELB
16+
- _Bug Fix_
17+
- None
18+
- _Change_
19+
- None
20+
121
# 0.0.1-beta 2022-11-23
222

323
### G42Cloud SDK CCE

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"
125125

126126
There are two types of G42 Cloud services, `regional` services and `global` services.
127127

128-
Global services contain IAM.
129-
130128
For `Regional` services' authentication, projectId is required.
131129

132130
For `global` services' authentication, domainId is required.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@g42cloud/g42cloud-sdk-service",
3-
"version": "0.0.1-beta",
3+
"version": "0.0.2-beta",
44
"description": "g42cloud SDK",
55
"scripts": {
66
"test": "echo \"Error: no test specified\" && exit 1"

services/cse/g42cloud-sdk-cse.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './v1/public-api';

services/cse/v1/CseClient.ts

Lines changed: 618 additions & 0 deletions
Large diffs are not rendered by default.

services/cse/v1/CseRegion.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Region } from "@huaweicloud/huaweicloud-sdk-core/region/region";
2+
3+
export class CseRegion {
4+
public static AE_AD_1 = new Region("ae-ad-1", "https://cse.ae-ad-1.g42cloud.com");
5+
6+
7+
private static STATIC_FIELDS = CseRegion.createStaticFields();
8+
private static createStaticFields() {
9+
let map = new Map<String, Region>();
10+
map.set("ae-ad-1", CseRegion.AE_AD_1);
11+
return map;
12+
}
13+
public static valueOf(regionId: String) {
14+
if (!regionId) {
15+
throw new Error("Unexpected empty parameter: regionId.");
16+
}
17+
const result = this.STATIC_FIELDS.get(regionId);
18+
if (result) {
19+
return result;
20+
}
21+
throw new Error(`Unexpected regionId: ${regionId}.`)
22+
}
23+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
3+
export class ClusterNode {
4+
public id?: string;
5+
public az?: string;
6+
public ip?: string;
7+
public label?: string;
8+
public status?: string;
9+
public constructor() {
10+
}
11+
public withId(id: string): ClusterNode {
12+
this['id'] = id;
13+
return this;
14+
}
15+
public withAz(az: string): ClusterNode {
16+
this['az'] = az;
17+
return this;
18+
}
19+
public withIp(ip: string): ClusterNode {
20+
this['ip'] = ip;
21+
return this;
22+
}
23+
public withLabel(label: string): ClusterNode {
24+
this['label'] = label;
25+
return this;
26+
}
27+
public withStatus(status: string): ClusterNode {
28+
this['status'] = status;
29+
return this;
30+
}
31+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { EngineCreateReq } from './EngineCreateReq';
2+
3+
4+
export class CreateEngineRequest {
5+
private 'X-Enterprise-Project-ID'?: string | undefined;
6+
public body?: EngineCreateReq;
7+
public constructor() {
8+
}
9+
public withXEnterpriseProjectID(xEnterpriseProjectID: string): CreateEngineRequest {
10+
this['X-Enterprise-Project-ID'] = xEnterpriseProjectID;
11+
return this;
12+
}
13+
public set xEnterpriseProjectID(xEnterpriseProjectID: string | undefined) {
14+
this['X-Enterprise-Project-ID'] = xEnterpriseProjectID;
15+
}
16+
public get xEnterpriseProjectID() {
17+
return this['X-Enterprise-Project-ID'];
18+
}
19+
public withBody(body: EngineCreateReq): CreateEngineRequest {
20+
this['body'] = body;
21+
return this;
22+
}
23+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse";
3+
4+
export class CreateEngineResponse extends SdkResponse {
5+
public id?: string;
6+
public name?: string;
7+
private 'job_id'?: number | undefined;
8+
public constructor() {
9+
super();
10+
}
11+
public withId(id: string): CreateEngineResponse {
12+
this['id'] = id;
13+
return this;
14+
}
15+
public withName(name: string): CreateEngineResponse {
16+
this['name'] = name;
17+
return this;
18+
}
19+
public withJobId(jobId: number): CreateEngineResponse {
20+
this['job_id'] = jobId;
21+
return this;
22+
}
23+
public set jobId(jobId: number | undefined) {
24+
this['job_id'] = jobId;
25+
}
26+
public get jobId() {
27+
return this['job_id'];
28+
}
29+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
3+
export class CreateKieReq {
4+
public key?: string;
5+
public labels?: object;
6+
public value?: string;
7+
private 'value_type'?: string | undefined;
8+
public status?: string;
9+
public constructor() {
10+
}
11+
public withKey(key: string): CreateKieReq {
12+
this['key'] = key;
13+
return this;
14+
}
15+
public withLabels(labels: object): CreateKieReq {
16+
this['labels'] = labels;
17+
return this;
18+
}
19+
public withValue(value: string): CreateKieReq {
20+
this['value'] = value;
21+
return this;
22+
}
23+
public withValueType(valueType: string): CreateKieReq {
24+
this['value_type'] = valueType;
25+
return this;
26+
}
27+
public set valueType(valueType: string | undefined) {
28+
this['value_type'] = valueType;
29+
}
30+
public get valueType() {
31+
return this['value_type'];
32+
}
33+
public withStatus(status: string): CreateKieReq {
34+
this['status'] = status;
35+
return this;
36+
}
37+
}

0 commit comments

Comments
 (0)