@huaweicloud/huaweicloud-sdk-codeartsbuild 3.1.46

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,44 @@
1
+ import { Region } from "@huaweicloud/huaweicloud-sdk-core/region/region";
2
+
3
+
4
+ interface RegionMap {
5
+ [key: string]: Region;
6
+ }
7
+
8
+ export class CodeArtsBuildRegion {
9
+ public static CN_NORTH_4 = new Region("cn-north-4", ["https://cloudbuild-ext.cn-north-4.myhuaweicloud.com"]);
10
+ public static CN_NORTH_1 = new Region("cn-north-1", ["https://cloudbuild-ext.cn-north-1.myhuaweicloud.com"]);
11
+ public static CN_EAST_2 = new Region("cn-east-2", ["https://cloudbuild-ext.cn-east-2.myhuaweicloud.com"]);
12
+ public static CN_SOUTH_1 = new Region("cn-south-1", ["https://cloudbuild-ext.cn-south-1.myhuaweicloud.com"]);
13
+ public static CN_EAST_3 = new Region("cn-east-3", ["https://cloudbuild-ext.cn-east-3.myhuaweicloud.com"]);
14
+ public static CN_SOUTH_2 = new Region("cn-south-2", ["https://cloudbuild-ext.cn-south-2.myhuaweicloud.com"]);
15
+ public static CN_SOUTHWEST_2 = new Region("cn-southwest-2", ["https://cloudbuild-ext.cn-southwest-2.myhuaweicloud.com"]);
16
+ public static AP_SOUTHEAST_3 = new Region("ap-southeast-3", ["https://cloudbuild-ext.ap-southeast-3.myhuaweicloud.com"]);
17
+ public static SA_BRAZIL_1 = new Region("sa-brazil-1", ["https://cloudbuild-ext.sa-brazil-1.myhuaweicloud.com"]);
18
+ public static LA_NORTH_2 = new Region("la-north-2", ["https://cloudbuild-ext.la-north-2.myhuaweicloud.com"]);
19
+
20
+
21
+ private static REGION_MAP: RegionMap = {
22
+ "cn-north-4":CodeArtsBuildRegion.CN_NORTH_4,
23
+ "cn-north-1":CodeArtsBuildRegion.CN_NORTH_1,
24
+ "cn-east-2":CodeArtsBuildRegion.CN_EAST_2,
25
+ "cn-south-1":CodeArtsBuildRegion.CN_SOUTH_1,
26
+ "cn-east-3":CodeArtsBuildRegion.CN_EAST_3,
27
+ "cn-south-2":CodeArtsBuildRegion.CN_SOUTH_2,
28
+ "cn-southwest-2":CodeArtsBuildRegion.CN_SOUTHWEST_2,
29
+ "ap-southeast-3":CodeArtsBuildRegion.AP_SOUTHEAST_3,
30
+ "sa-brazil-1":CodeArtsBuildRegion.SA_BRAZIL_1,
31
+ "la-north-2":CodeArtsBuildRegion.LA_NORTH_2
32
+ };
33
+
34
+ public static valueOf(regionId: string) {
35
+ if (!regionId) {
36
+ throw new Error("Unexpected empty parameter: regionId.");
37
+ }
38
+ const result = this.REGION_MAP[regionId];
39
+ if (result) {
40
+ return result;
41
+ }
42
+ throw new Error(`Unexpected regionId: ${regionId}.`)
43
+ }
44
+ }
@@ -0,0 +1,27 @@
1
+
2
+
3
+ export class BuildStep {
4
+ public name?: string;
5
+ public status?: string;
6
+ private 'build_time'?: number | undefined;
7
+ public constructor() {
8
+ }
9
+ public withName(name: string): BuildStep {
10
+ this['name'] = name;
11
+ return this;
12
+ }
13
+ public withStatus(status: string): BuildStep {
14
+ this['status'] = status;
15
+ return this;
16
+ }
17
+ public withBuildTime(buildTime: number): BuildStep {
18
+ this['build_time'] = buildTime;
19
+ return this;
20
+ }
21
+ public set buildTime(buildTime: number | undefined) {
22
+ this['build_time'] = buildTime;
23
+ }
24
+ public get buildTime() {
25
+ return this['build_time'];
26
+ }
27
+ }
@@ -0,0 +1,30 @@
1
+
2
+
3
+ export class DownloadKeystoreRequest {
4
+ private 'file_name': string | undefined;
5
+ private 'domain_id': string | undefined;
6
+ public constructor(fileName?: any, domainId?: any) {
7
+ this['file_name'] = fileName;
8
+ this['domain_id'] = domainId;
9
+ }
10
+ public withFileName(fileName: string): DownloadKeystoreRequest {
11
+ this['file_name'] = fileName;
12
+ return this;
13
+ }
14
+ public set fileName(fileName: string | undefined) {
15
+ this['file_name'] = fileName;
16
+ }
17
+ public get fileName() {
18
+ return this['file_name'];
19
+ }
20
+ public withDomainId(domainId: string): DownloadKeystoreRequest {
21
+ this['domain_id'] = domainId;
22
+ return this;
23
+ }
24
+ public set domainId(domainId: string | undefined) {
25
+ this['domain_id'] = domainId;
26
+ }
27
+ public get domainId() {
28
+ return this['domain_id'];
29
+ }
30
+ }
@@ -0,0 +1,8 @@
1
+
2
+ import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse";
3
+
4
+ export class DownloadKeystoreResponse extends SdkResponse {
5
+ public constructor() {
6
+ super();
7
+ }
8
+ }
@@ -0,0 +1,66 @@
1
+
2
+
3
+ export class HistoryRecord {
4
+ private 'record_id'?: string | undefined;
5
+ private 'job_id'?: string | undefined;
6
+ private 'build_number'?: number | undefined;
7
+ private 'start_time'?: string | undefined;
8
+ private 'end_time'?: string | undefined;
9
+ public result?: string;
10
+ public constructor() {
11
+ }
12
+ public withRecordId(recordId: string): HistoryRecord {
13
+ this['record_id'] = recordId;
14
+ return this;
15
+ }
16
+ public set recordId(recordId: string | undefined) {
17
+ this['record_id'] = recordId;
18
+ }
19
+ public get recordId() {
20
+ return this['record_id'];
21
+ }
22
+ public withJobId(jobId: string): HistoryRecord {
23
+ this['job_id'] = jobId;
24
+ return this;
25
+ }
26
+ public set jobId(jobId: string | undefined) {
27
+ this['job_id'] = jobId;
28
+ }
29
+ public get jobId() {
30
+ return this['job_id'];
31
+ }
32
+ public withBuildNumber(buildNumber: number): HistoryRecord {
33
+ this['build_number'] = buildNumber;
34
+ return this;
35
+ }
36
+ public set buildNumber(buildNumber: number | undefined) {
37
+ this['build_number'] = buildNumber;
38
+ }
39
+ public get buildNumber() {
40
+ return this['build_number'];
41
+ }
42
+ public withStartTime(startTime: string): HistoryRecord {
43
+ this['start_time'] = startTime;
44
+ return this;
45
+ }
46
+ public set startTime(startTime: string | undefined) {
47
+ this['start_time'] = startTime;
48
+ }
49
+ public get startTime() {
50
+ return this['start_time'];
51
+ }
52
+ public withEndTime(endTime: string): HistoryRecord {
53
+ this['end_time'] = endTime;
54
+ return this;
55
+ }
56
+ public set endTime(endTime: string | undefined) {
57
+ this['end_time'] = endTime;
58
+ }
59
+ public get endTime() {
60
+ return this['end_time'];
61
+ }
62
+ public withResult(result: string): HistoryRecord {
63
+ this['result'] = result;
64
+ return this;
65
+ }
66
+ }
@@ -0,0 +1,109 @@
1
+
2
+
3
+ export class HistoryRecord1 {
4
+ private 'record_id'?: string | undefined;
5
+ private 'job_id'?: string | undefined;
6
+ private 'build_number'?: number | undefined;
7
+ private 'start_time'?: string | undefined;
8
+ private 'end_time'?: string | undefined;
9
+ public result?: string;
10
+ public branch?: string;
11
+ private 'commit_id'?: string | undefined;
12
+ private 'commit_message'?: string | undefined;
13
+ public executor?: string;
14
+ private 'trigger_type'?: string | undefined;
15
+ public constructor() {
16
+ }
17
+ public withRecordId(recordId: string): HistoryRecord1 {
18
+ this['record_id'] = recordId;
19
+ return this;
20
+ }
21
+ public set recordId(recordId: string | undefined) {
22
+ this['record_id'] = recordId;
23
+ }
24
+ public get recordId() {
25
+ return this['record_id'];
26
+ }
27
+ public withJobId(jobId: string): HistoryRecord1 {
28
+ this['job_id'] = jobId;
29
+ return this;
30
+ }
31
+ public set jobId(jobId: string | undefined) {
32
+ this['job_id'] = jobId;
33
+ }
34
+ public get jobId() {
35
+ return this['job_id'];
36
+ }
37
+ public withBuildNumber(buildNumber: number): HistoryRecord1 {
38
+ this['build_number'] = buildNumber;
39
+ return this;
40
+ }
41
+ public set buildNumber(buildNumber: number | undefined) {
42
+ this['build_number'] = buildNumber;
43
+ }
44
+ public get buildNumber() {
45
+ return this['build_number'];
46
+ }
47
+ public withStartTime(startTime: string): HistoryRecord1 {
48
+ this['start_time'] = startTime;
49
+ return this;
50
+ }
51
+ public set startTime(startTime: string | undefined) {
52
+ this['start_time'] = startTime;
53
+ }
54
+ public get startTime() {
55
+ return this['start_time'];
56
+ }
57
+ public withEndTime(endTime: string): HistoryRecord1 {
58
+ this['end_time'] = endTime;
59
+ return this;
60
+ }
61
+ public set endTime(endTime: string | undefined) {
62
+ this['end_time'] = endTime;
63
+ }
64
+ public get endTime() {
65
+ return this['end_time'];
66
+ }
67
+ public withResult(result: string): HistoryRecord1 {
68
+ this['result'] = result;
69
+ return this;
70
+ }
71
+ public withBranch(branch: string): HistoryRecord1 {
72
+ this['branch'] = branch;
73
+ return this;
74
+ }
75
+ public withCommitId(commitId: string): HistoryRecord1 {
76
+ this['commit_id'] = commitId;
77
+ return this;
78
+ }
79
+ public set commitId(commitId: string | undefined) {
80
+ this['commit_id'] = commitId;
81
+ }
82
+ public get commitId() {
83
+ return this['commit_id'];
84
+ }
85
+ public withCommitMessage(commitMessage: string): HistoryRecord1 {
86
+ this['commit_message'] = commitMessage;
87
+ return this;
88
+ }
89
+ public set commitMessage(commitMessage: string | undefined) {
90
+ this['commit_message'] = commitMessage;
91
+ }
92
+ public get commitMessage() {
93
+ return this['commit_message'];
94
+ }
95
+ public withExecutor(executor: string): HistoryRecord1 {
96
+ this['executor'] = executor;
97
+ return this;
98
+ }
99
+ public withTriggerType(triggerType: string): HistoryRecord1 {
100
+ this['trigger_type'] = triggerType;
101
+ return this;
102
+ }
103
+ public set triggerType(triggerType: string | undefined) {
104
+ this['trigger_type'] = triggerType;
105
+ }
106
+ public get triggerType() {
107
+ return this['trigger_type'];
108
+ }
109
+ }
@@ -0,0 +1,175 @@
1
+
2
+
3
+ export class Job {
4
+ public id?: string;
5
+ private 'job_name'?: string | undefined;
6
+ private 'job_creator'?: string | undefined;
7
+ private 'user_name'?: string | undefined;
8
+ private 'last_build_time'?: number | undefined;
9
+ private 'health_score'?: number | undefined;
10
+ private 'source_code'?: string | undefined;
11
+ private 'last_build_status'?: string | undefined;
12
+ private 'is_finished'?: boolean | undefined;
13
+ public disabled?: boolean;
14
+ public favorite?: boolean;
15
+ private 'is_modify'?: boolean | undefined;
16
+ private 'is_delete'?: boolean | undefined;
17
+ private 'is_execute'?: boolean | undefined;
18
+ private 'is_copy'?: boolean | undefined;
19
+ private 'is_forbidden'?: boolean | undefined;
20
+ private 'is_view'?: boolean | undefined;
21
+ public constructor() {
22
+ }
23
+ public withId(id: string): Job {
24
+ this['id'] = id;
25
+ return this;
26
+ }
27
+ public withJobName(jobName: string): Job {
28
+ this['job_name'] = jobName;
29
+ return this;
30
+ }
31
+ public set jobName(jobName: string | undefined) {
32
+ this['job_name'] = jobName;
33
+ }
34
+ public get jobName() {
35
+ return this['job_name'];
36
+ }
37
+ public withJobCreator(jobCreator: string): Job {
38
+ this['job_creator'] = jobCreator;
39
+ return this;
40
+ }
41
+ public set jobCreator(jobCreator: string | undefined) {
42
+ this['job_creator'] = jobCreator;
43
+ }
44
+ public get jobCreator() {
45
+ return this['job_creator'];
46
+ }
47
+ public withUserName(userName: string): Job {
48
+ this['user_name'] = userName;
49
+ return this;
50
+ }
51
+ public set userName(userName: string | undefined) {
52
+ this['user_name'] = userName;
53
+ }
54
+ public get userName() {
55
+ return this['user_name'];
56
+ }
57
+ public withLastBuildTime(lastBuildTime: number): Job {
58
+ this['last_build_time'] = lastBuildTime;
59
+ return this;
60
+ }
61
+ public set lastBuildTime(lastBuildTime: number | undefined) {
62
+ this['last_build_time'] = lastBuildTime;
63
+ }
64
+ public get lastBuildTime() {
65
+ return this['last_build_time'];
66
+ }
67
+ public withHealthScore(healthScore: number): Job {
68
+ this['health_score'] = healthScore;
69
+ return this;
70
+ }
71
+ public set healthScore(healthScore: number | undefined) {
72
+ this['health_score'] = healthScore;
73
+ }
74
+ public get healthScore() {
75
+ return this['health_score'];
76
+ }
77
+ public withSourceCode(sourceCode: string): Job {
78
+ this['source_code'] = sourceCode;
79
+ return this;
80
+ }
81
+ public set sourceCode(sourceCode: string | undefined) {
82
+ this['source_code'] = sourceCode;
83
+ }
84
+ public get sourceCode() {
85
+ return this['source_code'];
86
+ }
87
+ public withLastBuildStatus(lastBuildStatus: string): Job {
88
+ this['last_build_status'] = lastBuildStatus;
89
+ return this;
90
+ }
91
+ public set lastBuildStatus(lastBuildStatus: string | undefined) {
92
+ this['last_build_status'] = lastBuildStatus;
93
+ }
94
+ public get lastBuildStatus() {
95
+ return this['last_build_status'];
96
+ }
97
+ public withIsFinished(isFinished: boolean): Job {
98
+ this['is_finished'] = isFinished;
99
+ return this;
100
+ }
101
+ public set isFinished(isFinished: boolean | undefined) {
102
+ this['is_finished'] = isFinished;
103
+ }
104
+ public get isFinished() {
105
+ return this['is_finished'];
106
+ }
107
+ public withDisabled(disabled: boolean): Job {
108
+ this['disabled'] = disabled;
109
+ return this;
110
+ }
111
+ public withFavorite(favorite: boolean): Job {
112
+ this['favorite'] = favorite;
113
+ return this;
114
+ }
115
+ public withIsModify(isModify: boolean): Job {
116
+ this['is_modify'] = isModify;
117
+ return this;
118
+ }
119
+ public set isModify(isModify: boolean | undefined) {
120
+ this['is_modify'] = isModify;
121
+ }
122
+ public get isModify() {
123
+ return this['is_modify'];
124
+ }
125
+ public withIsDelete(isDelete: boolean): Job {
126
+ this['is_delete'] = isDelete;
127
+ return this;
128
+ }
129
+ public set isDelete(isDelete: boolean | undefined) {
130
+ this['is_delete'] = isDelete;
131
+ }
132
+ public get isDelete() {
133
+ return this['is_delete'];
134
+ }
135
+ public withIsExecute(isExecute: boolean): Job {
136
+ this['is_execute'] = isExecute;
137
+ return this;
138
+ }
139
+ public set isExecute(isExecute: boolean | undefined) {
140
+ this['is_execute'] = isExecute;
141
+ }
142
+ public get isExecute() {
143
+ return this['is_execute'];
144
+ }
145
+ public withIsCopy(isCopy: boolean): Job {
146
+ this['is_copy'] = isCopy;
147
+ return this;
148
+ }
149
+ public set isCopy(isCopy: boolean | undefined) {
150
+ this['is_copy'] = isCopy;
151
+ }
152
+ public get isCopy() {
153
+ return this['is_copy'];
154
+ }
155
+ public withIsForbidden(isForbidden: boolean): Job {
156
+ this['is_forbidden'] = isForbidden;
157
+ return this;
158
+ }
159
+ public set isForbidden(isForbidden: boolean | undefined) {
160
+ this['is_forbidden'] = isForbidden;
161
+ }
162
+ public get isForbidden() {
163
+ return this['is_forbidden'];
164
+ }
165
+ public withIsView(isView: boolean): Job {
166
+ this['is_view'] = isView;
167
+ return this;
168
+ }
169
+ public set isView(isView: boolean | undefined) {
170
+ this['is_view'] = isView;
171
+ }
172
+ public get isView() {
173
+ return this['is_view'];
174
+ }
175
+ }
@@ -0,0 +1,18 @@
1
+
2
+
3
+ export class ParameterItem {
4
+ public name: string;
5
+ public value: string;
6
+ public constructor(name?: any, value?: any) {
7
+ this['name'] = name;
8
+ this['value'] = value;
9
+ }
10
+ public withName(name: string): ParameterItem {
11
+ this['name'] = name;
12
+ return this;
13
+ }
14
+ public withValue(value: string): ParameterItem {
15
+ this['value'] = value;
16
+ return this;
17
+ }
18
+ }
@@ -0,0 +1,12 @@
1
+ import { RunJobRequestBody } from './RunJobRequestBody';
2
+
3
+
4
+ export class RunJobRequest {
5
+ public body?: RunJobRequestBody;
6
+ public constructor() {
7
+ }
8
+ public withBody(body: RunJobRequestBody): RunJobRequest {
9
+ this['body'] = body;
10
+ return this;
11
+ }
12
+ }
@@ -0,0 +1,30 @@
1
+ import { ParameterItem } from './ParameterItem';
2
+ import { Scm } from './Scm';
3
+
4
+
5
+ export class RunJobRequestBody {
6
+ private 'job_id': string | undefined;
7
+ public parameter?: Array<ParameterItem>;
8
+ public scm?: Scm;
9
+ public constructor(jobId?: any) {
10
+ this['job_id'] = jobId;
11
+ }
12
+ public withJobId(jobId: string): RunJobRequestBody {
13
+ this['job_id'] = jobId;
14
+ return this;
15
+ }
16
+ public set jobId(jobId: string | undefined) {
17
+ this['job_id'] = jobId;
18
+ }
19
+ public get jobId() {
20
+ return this['job_id'];
21
+ }
22
+ public withParameter(parameter: Array<ParameterItem>): RunJobRequestBody {
23
+ this['parameter'] = parameter;
24
+ return this;
25
+ }
26
+ public withScm(scm: Scm): RunJobRequestBody {
27
+ this['scm'] = scm;
28
+ return this;
29
+ }
30
+ }
@@ -0,0 +1,41 @@
1
+
2
+ import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse";
3
+
4
+ export class RunJobResponse extends SdkResponse {
5
+ private 'octopus_job_name'?: string | undefined;
6
+ private 'actual_build_number'?: string | undefined;
7
+ private 'daily_build_number'?: string | undefined;
8
+ public constructor() {
9
+ super();
10
+ }
11
+ public withOctopusJobName(octopusJobName: string): RunJobResponse {
12
+ this['octopus_job_name'] = octopusJobName;
13
+ return this;
14
+ }
15
+ public set octopusJobName(octopusJobName: string | undefined) {
16
+ this['octopus_job_name'] = octopusJobName;
17
+ }
18
+ public get octopusJobName() {
19
+ return this['octopus_job_name'];
20
+ }
21
+ public withActualBuildNumber(actualBuildNumber: string): RunJobResponse {
22
+ this['actual_build_number'] = actualBuildNumber;
23
+ return this;
24
+ }
25
+ public set actualBuildNumber(actualBuildNumber: string | undefined) {
26
+ this['actual_build_number'] = actualBuildNumber;
27
+ }
28
+ public get actualBuildNumber() {
29
+ return this['actual_build_number'];
30
+ }
31
+ public withDailyBuildNumber(dailyBuildNumber: string): RunJobResponse {
32
+ this['daily_build_number'] = dailyBuildNumber;
33
+ return this;
34
+ }
35
+ public set dailyBuildNumber(dailyBuildNumber: string | undefined) {
36
+ this['daily_build_number'] = dailyBuildNumber;
37
+ }
38
+ public get dailyBuildNumber() {
39
+ return this['daily_build_number'];
40
+ }
41
+ }
@@ -0,0 +1,28 @@
1
+
2
+
3
+ export class Scm {
4
+ private 'build_tag'?: string | undefined;
5
+ private 'build_commit_id'?: string | undefined;
6
+ public constructor() {
7
+ }
8
+ public withBuildTag(buildTag: string): Scm {
9
+ this['build_tag'] = buildTag;
10
+ return this;
11
+ }
12
+ public set buildTag(buildTag: string | undefined) {
13
+ this['build_tag'] = buildTag;
14
+ }
15
+ public get buildTag() {
16
+ return this['build_tag'];
17
+ }
18
+ public withBuildCommitId(buildCommitId: string): Scm {
19
+ this['build_commit_id'] = buildCommitId;
20
+ return this;
21
+ }
22
+ public set buildCommitId(buildCommitId: string | undefined) {
23
+ this['build_commit_id'] = buildCommitId;
24
+ }
25
+ public get buildCommitId() {
26
+ return this['build_commit_id'];
27
+ }
28
+ }
@@ -0,0 +1,30 @@
1
+
2
+
3
+ export class ShowHistoryDetailsRequest {
4
+ private 'job_id': string | undefined;
5
+ private 'build_number': number | undefined;
6
+ public constructor(jobId?: any, buildNumber?: any) {
7
+ this['job_id'] = jobId;
8
+ this['build_number'] = buildNumber;
9
+ }
10
+ public withJobId(jobId: string): ShowHistoryDetailsRequest {
11
+ this['job_id'] = jobId;
12
+ return this;
13
+ }
14
+ public set jobId(jobId: string | undefined) {
15
+ this['job_id'] = jobId;
16
+ }
17
+ public get jobId() {
18
+ return this['job_id'];
19
+ }
20
+ public withBuildNumber(buildNumber: number): ShowHistoryDetailsRequest {
21
+ this['build_number'] = buildNumber;
22
+ return this;
23
+ }
24
+ public set buildNumber(buildNumber: number | undefined) {
25
+ this['build_number'] = buildNumber;
26
+ }
27
+ public get buildNumber() {
28
+ return this['build_number'];
29
+ }
30
+ }