@scaleway/sdk-jobs 2.2.2 → 2.3.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.
@@ -1,265 +1,173 @@
1
+ import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
1
2
  import randomName from "@scaleway/random-name";
2
- import { resolveOneOf, isJSONObject, unmarshalDate, unmarshalArrayOfObject } from "@scaleway/sdk-client";
3
- const unmarshalSecretEnvVar = (data) => {
4
- if (!isJSONObject(data)) {
5
- throw new TypeError(
6
- `Unmarshalling the type 'SecretEnvVar' failed as data isn't a dictionary.`
7
- );
8
- }
9
- return {
10
- name: data.name
11
- };
3
+ var unmarshalSecretEnvVar = (data) => {
4
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SecretEnvVar' failed as data isn't a dictionary.`);
5
+ return { name: data.name };
12
6
  };
13
- const unmarshalSecretFile = (data) => {
14
- if (!isJSONObject(data)) {
15
- throw new TypeError(
16
- `Unmarshalling the type 'SecretFile' failed as data isn't a dictionary.`
17
- );
18
- }
19
- return {
20
- path: data.path
21
- };
7
+ var unmarshalSecretFile = (data) => {
8
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SecretFile' failed as data isn't a dictionary.`);
9
+ return { path: data.path };
22
10
  };
23
11
  const unmarshalSecret = (data) => {
24
- if (!isJSONObject(data)) {
25
- throw new TypeError(
26
- `Unmarshalling the type 'Secret' failed as data isn't a dictionary.`
27
- );
28
- }
29
- return {
30
- envVar: data.env_var ? unmarshalSecretEnvVar(data.env_var) : void 0,
31
- file: data.file ? unmarshalSecretFile(data.file) : void 0,
32
- secretId: data.secret_id,
33
- secretManagerId: data.secret_manager_id,
34
- secretManagerVersion: data.secret_manager_version
35
- };
12
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Secret' failed as data isn't a dictionary.`);
13
+ return {
14
+ envVar: data.env_var ? unmarshalSecretEnvVar(data.env_var) : void 0,
15
+ file: data.file ? unmarshalSecretFile(data.file) : void 0,
16
+ secretId: data.secret_id,
17
+ secretManagerId: data.secret_manager_id,
18
+ secretManagerVersion: data.secret_manager_version
19
+ };
36
20
  };
37
- const unmarshalCronSchedule = (data) => {
38
- if (!isJSONObject(data)) {
39
- throw new TypeError(
40
- `Unmarshalling the type 'CronSchedule' failed as data isn't a dictionary.`
41
- );
42
- }
43
- return {
44
- schedule: data.schedule,
45
- timezone: data.timezone
46
- };
21
+ var unmarshalCronSchedule = (data) => {
22
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CronSchedule' failed as data isn't a dictionary.`);
23
+ return {
24
+ schedule: data.schedule,
25
+ timezone: data.timezone
26
+ };
47
27
  };
48
28
  const unmarshalJobDefinition = (data) => {
49
- if (!isJSONObject(data)) {
50
- throw new TypeError(
51
- `Unmarshalling the type 'JobDefinition' failed as data isn't a dictionary.`
52
- );
53
- }
54
- return {
55
- command: data.command,
56
- cpuLimit: data.cpu_limit,
57
- createdAt: unmarshalDate(data.created_at),
58
- cronSchedule: data.cron_schedule ? unmarshalCronSchedule(data.cron_schedule) : void 0,
59
- description: data.description,
60
- environmentVariables: data.environment_variables,
61
- id: data.id,
62
- imageUri: data.image_uri,
63
- jobTimeout: data.job_timeout,
64
- localStorageCapacity: data.local_storage_capacity,
65
- memoryLimit: data.memory_limit,
66
- name: data.name,
67
- projectId: data.project_id,
68
- region: data.region,
69
- updatedAt: unmarshalDate(data.updated_at)
70
- };
29
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobDefinition' failed as data isn't a dictionary.`);
30
+ return {
31
+ command: data.command,
32
+ cpuLimit: data.cpu_limit,
33
+ createdAt: unmarshalDate(data.created_at),
34
+ cronSchedule: data.cron_schedule ? unmarshalCronSchedule(data.cron_schedule) : void 0,
35
+ description: data.description,
36
+ environmentVariables: data.environment_variables,
37
+ id: data.id,
38
+ imageUri: data.image_uri,
39
+ jobTimeout: data.job_timeout,
40
+ localStorageCapacity: data.local_storage_capacity,
41
+ memoryLimit: data.memory_limit,
42
+ name: data.name,
43
+ projectId: data.project_id,
44
+ region: data.region,
45
+ updatedAt: unmarshalDate(data.updated_at)
46
+ };
71
47
  };
72
48
  const unmarshalJobRun = (data) => {
73
- if (!isJSONObject(data)) {
74
- throw new TypeError(
75
- `Unmarshalling the type 'JobRun' failed as data isn't a dictionary.`
76
- );
77
- }
78
- return {
79
- command: data.command,
80
- cpuLimit: data.cpu_limit,
81
- createdAt: unmarshalDate(data.created_at),
82
- environmentVariables: data.environment_variables,
83
- errorMessage: data.error_message,
84
- exitCode: data.exit_code,
85
- id: data.id,
86
- jobDefinitionId: data.job_definition_id,
87
- localStorageCapacity: data.local_storage_capacity,
88
- memoryLimit: data.memory_limit,
89
- region: data.region,
90
- runDuration: data.run_duration,
91
- startedAt: unmarshalDate(data.started_at),
92
- state: data.state,
93
- terminatedAt: unmarshalDate(data.terminated_at),
94
- updatedAt: unmarshalDate(data.updated_at)
95
- };
49
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobRun' failed as data isn't a dictionary.`);
50
+ return {
51
+ command: data.command,
52
+ cpuLimit: data.cpu_limit,
53
+ createdAt: unmarshalDate(data.created_at),
54
+ environmentVariables: data.environment_variables,
55
+ errorMessage: data.error_message,
56
+ exitCode: data.exit_code,
57
+ id: data.id,
58
+ jobDefinitionId: data.job_definition_id,
59
+ localStorageCapacity: data.local_storage_capacity,
60
+ memoryLimit: data.memory_limit,
61
+ region: data.region,
62
+ runDuration: data.run_duration,
63
+ startedAt: unmarshalDate(data.started_at),
64
+ state: data.state,
65
+ terminatedAt: unmarshalDate(data.terminated_at),
66
+ updatedAt: unmarshalDate(data.updated_at)
67
+ };
96
68
  };
97
69
  const unmarshalCreateJobDefinitionSecretsResponse = (data) => {
98
- if (!isJSONObject(data)) {
99
- throw new TypeError(
100
- `Unmarshalling the type 'CreateJobDefinitionSecretsResponse' failed as data isn't a dictionary.`
101
- );
102
- }
103
- return {
104
- secrets: unmarshalArrayOfObject(data.secrets, unmarshalSecret)
105
- };
70
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CreateJobDefinitionSecretsResponse' failed as data isn't a dictionary.`);
71
+ return { secrets: unmarshalArrayOfObject(data.secrets, unmarshalSecret) };
106
72
  };
107
73
  const unmarshalJobsLimits = (data) => {
108
- if (!isJSONObject(data)) {
109
- throw new TypeError(
110
- `Unmarshalling the type 'JobsLimits' failed as data isn't a dictionary.`
111
- );
112
- }
113
- return {
114
- secretsPerJobDefinition: data.secrets_per_job_definition
115
- };
74
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobsLimits' failed as data isn't a dictionary.`);
75
+ return { secretsPerJobDefinition: data.secrets_per_job_definition };
116
76
  };
117
77
  const unmarshalListJobDefinitionSecretsResponse = (data) => {
118
- if (!isJSONObject(data)) {
119
- throw new TypeError(
120
- `Unmarshalling the type 'ListJobDefinitionSecretsResponse' failed as data isn't a dictionary.`
121
- );
122
- }
123
- return {
124
- secrets: unmarshalArrayOfObject(data.secrets, unmarshalSecret),
125
- totalCount: data.total_count
126
- };
78
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobDefinitionSecretsResponse' failed as data isn't a dictionary.`);
79
+ return {
80
+ secrets: unmarshalArrayOfObject(data.secrets, unmarshalSecret),
81
+ totalCount: data.total_count
82
+ };
127
83
  };
128
84
  const unmarshalListJobDefinitionsResponse = (data) => {
129
- if (!isJSONObject(data)) {
130
- throw new TypeError(
131
- `Unmarshalling the type 'ListJobDefinitionsResponse' failed as data isn't a dictionary.`
132
- );
133
- }
134
- return {
135
- jobDefinitions: unmarshalArrayOfObject(data.job_definitions, unmarshalJobDefinition),
136
- totalCount: data.total_count
137
- };
85
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobDefinitionsResponse' failed as data isn't a dictionary.`);
86
+ return {
87
+ jobDefinitions: unmarshalArrayOfObject(data.job_definitions, unmarshalJobDefinition),
88
+ totalCount: data.total_count
89
+ };
138
90
  };
139
91
  const unmarshalListJobRunsResponse = (data) => {
140
- if (!isJSONObject(data)) {
141
- throw new TypeError(
142
- `Unmarshalling the type 'ListJobRunsResponse' failed as data isn't a dictionary.`
143
- );
144
- }
145
- return {
146
- jobRuns: unmarshalArrayOfObject(data.job_runs, unmarshalJobRun),
147
- totalCount: data.total_count
148
- };
92
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobRunsResponse' failed as data isn't a dictionary.`);
93
+ return {
94
+ jobRuns: unmarshalArrayOfObject(data.job_runs, unmarshalJobRun),
95
+ totalCount: data.total_count
96
+ };
149
97
  };
150
- const unmarshalResource = (data) => {
151
- if (!isJSONObject(data)) {
152
- throw new TypeError(
153
- `Unmarshalling the type 'Resource' failed as data isn't a dictionary.`
154
- );
155
- }
156
- return {
157
- cpuLimit: data.cpu_limit,
158
- memoryLimit: data.memory_limit
159
- };
98
+ var unmarshalResource = (data) => {
99
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Resource' failed as data isn't a dictionary.`);
100
+ return {
101
+ cpuLimit: data.cpu_limit,
102
+ memoryLimit: data.memory_limit
103
+ };
160
104
  };
161
105
  const unmarshalListJobsResourcesResponse = (data) => {
162
- if (!isJSONObject(data)) {
163
- throw new TypeError(
164
- `Unmarshalling the type 'ListJobsResourcesResponse' failed as data isn't a dictionary.`
165
- );
166
- }
167
- return {
168
- resources: unmarshalArrayOfObject(data.resources, unmarshalResource)
169
- };
106
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobsResourcesResponse' failed as data isn't a dictionary.`);
107
+ return { resources: unmarshalArrayOfObject(data.resources, unmarshalResource) };
170
108
  };
171
109
  const unmarshalStartJobDefinitionResponse = (data) => {
172
- if (!isJSONObject(data)) {
173
- throw new TypeError(
174
- `Unmarshalling the type 'StartJobDefinitionResponse' failed as data isn't a dictionary.`
175
- );
176
- }
177
- return {
178
- jobRuns: unmarshalArrayOfObject(data.job_runs, unmarshalJobRun)
179
- };
110
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'StartJobDefinitionResponse' failed as data isn't a dictionary.`);
111
+ return { jobRuns: unmarshalArrayOfObject(data.job_runs, unmarshalJobRun) };
180
112
  };
181
- const marshalCreateJobDefinitionRequestCronScheduleConfig = (request, defaults) => ({
182
- schedule: request.schedule,
183
- timezone: request.timezone
113
+ var marshalCreateJobDefinitionRequestCronScheduleConfig = (request, defaults) => ({
114
+ schedule: request.schedule,
115
+ timezone: request.timezone
184
116
  });
185
117
  const marshalCreateJobDefinitionRequest = (request, defaults) => ({
186
- command: request.command,
187
- cpu_limit: request.cpuLimit,
188
- cron_schedule: request.cronSchedule !== void 0 ? marshalCreateJobDefinitionRequestCronScheduleConfig(request.cronSchedule) : void 0,
189
- description: request.description,
190
- environment_variables: request.environmentVariables !== void 0 ? request.environmentVariables : void 0,
191
- image_uri: request.imageUri,
192
- job_timeout: request.jobTimeout,
193
- local_storage_capacity: request.localStorageCapacity,
194
- memory_limit: request.memoryLimit,
195
- name: request.name || randomName("job"),
196
- project_id: request.projectId ?? defaults.defaultProjectId
118
+ command: request.command,
119
+ cpu_limit: request.cpuLimit,
120
+ cron_schedule: request.cronSchedule !== void 0 ? marshalCreateJobDefinitionRequestCronScheduleConfig(request.cronSchedule, defaults) : void 0,
121
+ description: request.description,
122
+ environment_variables: request.environmentVariables !== void 0 ? request.environmentVariables : void 0,
123
+ image_uri: request.imageUri,
124
+ job_timeout: request.jobTimeout,
125
+ local_storage_capacity: request.localStorageCapacity,
126
+ memory_limit: request.memoryLimit,
127
+ name: request.name || randomName("job"),
128
+ project_id: request.projectId ?? defaults.defaultProjectId
197
129
  });
198
- const marshalCreateJobDefinitionSecretsRequestSecretConfig = (request, defaults) => ({
199
- secret_manager_id: request.secretManagerId,
200
- secret_manager_version: request.secretManagerVersion,
201
- ...resolveOneOf([
202
- {
203
- param: "path",
204
- value: request.path
205
- },
206
- {
207
- param: "env_var_name",
208
- value: request.envVarName
209
- }
210
- ])
211
- });
212
- const marshalCreateJobDefinitionSecretsRequest = (request, defaults) => ({
213
- secrets: request.secrets.map((elt) => marshalCreateJobDefinitionSecretsRequestSecretConfig(elt))
130
+ var marshalCreateJobDefinitionSecretsRequestSecretConfig = (request, defaults) => ({
131
+ secret_manager_id: request.secretManagerId,
132
+ secret_manager_version: request.secretManagerVersion,
133
+ ...resolveOneOf([{
134
+ param: "path",
135
+ value: request.path
136
+ }, {
137
+ param: "env_var_name",
138
+ value: request.envVarName
139
+ }])
214
140
  });
141
+ const marshalCreateJobDefinitionSecretsRequest = (request, defaults) => ({ secrets: request.secrets.map((elt) => marshalCreateJobDefinitionSecretsRequestSecretConfig(elt, defaults)) });
215
142
  const marshalStartJobDefinitionRequest = (request, defaults) => ({
216
- command: request.command,
217
- environment_variables: request.environmentVariables,
218
- replicas: request.replicas
143
+ command: request.command,
144
+ environment_variables: request.environmentVariables,
145
+ replicas: request.replicas
219
146
  });
220
- const marshalUpdateJobDefinitionRequestCronScheduleConfig = (request, defaults) => ({
221
- schedule: request.schedule,
222
- timezone: request.timezone
147
+ var marshalUpdateJobDefinitionRequestCronScheduleConfig = (request, defaults) => ({
148
+ schedule: request.schedule,
149
+ timezone: request.timezone
223
150
  });
224
151
  const marshalUpdateJobDefinitionRequest = (request, defaults) => ({
225
- command: request.command,
226
- cpu_limit: request.cpuLimit,
227
- cron_schedule: request.cronSchedule !== void 0 ? marshalUpdateJobDefinitionRequestCronScheduleConfig(request.cronSchedule) : void 0,
228
- description: request.description,
229
- environment_variables: request.environmentVariables,
230
- image_uri: request.imageUri,
231
- job_timeout: request.jobTimeout,
232
- local_storage_capacity: request.localStorageCapacity,
233
- memory_limit: request.memoryLimit,
234
- name: request.name
152
+ command: request.command,
153
+ cpu_limit: request.cpuLimit,
154
+ cron_schedule: request.cronSchedule !== void 0 ? marshalUpdateJobDefinitionRequestCronScheduleConfig(request.cronSchedule, defaults) : void 0,
155
+ description: request.description,
156
+ environment_variables: request.environmentVariables,
157
+ image_uri: request.imageUri,
158
+ job_timeout: request.jobTimeout,
159
+ local_storage_capacity: request.localStorageCapacity,
160
+ memory_limit: request.memoryLimit,
161
+ name: request.name
235
162
  });
236
163
  const marshalUpdateJobDefinitionSecretRequest = (request, defaults) => ({
237
- secret_manager_version: request.secretManagerVersion,
238
- ...resolveOneOf([
239
- {
240
- param: "path",
241
- value: request.path
242
- },
243
- {
244
- param: "env_var_name",
245
- value: request.envVarName
246
- }
247
- ])
164
+ secret_manager_version: request.secretManagerVersion,
165
+ ...resolveOneOf([{
166
+ param: "path",
167
+ value: request.path
168
+ }, {
169
+ param: "env_var_name",
170
+ value: request.envVarName
171
+ }])
248
172
  });
249
- export {
250
- marshalCreateJobDefinitionRequest,
251
- marshalCreateJobDefinitionSecretsRequest,
252
- marshalStartJobDefinitionRequest,
253
- marshalUpdateJobDefinitionRequest,
254
- marshalUpdateJobDefinitionSecretRequest,
255
- unmarshalCreateJobDefinitionSecretsResponse,
256
- unmarshalJobDefinition,
257
- unmarshalJobRun,
258
- unmarshalJobsLimits,
259
- unmarshalListJobDefinitionSecretsResponse,
260
- unmarshalListJobDefinitionsResponse,
261
- unmarshalListJobRunsResponse,
262
- unmarshalListJobsResourcesResponse,
263
- unmarshalSecret,
264
- unmarshalStartJobDefinitionResponse
265
- };
173
+ export { marshalCreateJobDefinitionRequest, marshalCreateJobDefinitionSecretsRequest, marshalStartJobDefinitionRequest, marshalUpdateJobDefinitionRequest, marshalUpdateJobDefinitionSecretRequest, unmarshalCreateJobDefinitionSecretsResponse, unmarshalJobDefinition, unmarshalJobRun, unmarshalJobsLimits, unmarshalListJobDefinitionSecretsResponse, unmarshalListJobDefinitionsResponse, unmarshalListJobRunsResponse, unmarshalListJobsResourcesResponse, unmarshalSecret, unmarshalStartJobDefinitionResponse };
@@ -1,115 +1,77 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
3
+ CreateJobDefinitionRequest: () => CreateJobDefinitionRequest,
4
+ CreateJobDefinitionRequestCronScheduleConfig: () => CreateJobDefinitionRequestCronScheduleConfig,
5
+ CreateJobDefinitionSecretsRequestSecretConfig: () => CreateJobDefinitionSecretsRequestSecretConfig,
6
+ CronSchedule: () => CronSchedule,
7
+ ListJobDefinitionsRequest: () => ListJobDefinitionsRequest,
8
+ ListJobRunsRequest: () => ListJobRunsRequest,
9
+ StartJobDefinitionRequest: () => StartJobDefinitionRequest,
10
+ UpdateJobDefinitionRequest: () => UpdateJobDefinitionRequest,
11
+ UpdateJobDefinitionRequestCronScheduleConfig: () => UpdateJobDefinitionRequestCronScheduleConfig,
12
+ UpdateJobDefinitionSecretRequest: () => UpdateJobDefinitionSecretRequest
13
+ });
1
14
  const CreateJobDefinitionRequest = {
2
- cpuLimit: {
3
- greaterThan: 0
4
- },
5
- description: {
6
- maxLength: 255
7
- },
8
- imageUri: {
9
- pattern: /^((?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*)(?::(\w[A-Za-z0-9_.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$/
10
- },
11
- localStorageCapacity: {
12
- greaterThan: 0
13
- },
14
- memoryLimit: {
15
- greaterThan: 0
16
- },
17
- name: {
18
- pattern: /^[A-Za-z0-9-_]{3,50}$/
19
- }
15
+ cpuLimit: { greaterThan: 0 },
16
+ description: { maxLength: 255 },
17
+ imageUri: { pattern: /^((?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*)(?::(\w[A-Za-z0-9_.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$/ },
18
+ localStorageCapacity: { greaterThan: 0 },
19
+ memoryLimit: { greaterThan: 0 },
20
+ name: { pattern: /^[A-Za-z0-9-_]{3,50}$/ }
20
21
  };
21
22
  const CreateJobDefinitionRequestCronScheduleConfig = {
22
- schedule: {
23
- maxLength: 255,
24
- minLength: 1
25
- },
26
- timezone: {
27
- maxLength: 255,
28
- minLength: 1
29
- }
30
- };
31
- const CreateJobDefinitionSecretsRequestSecretConfig = {
32
- secretManagerVersion: {
33
- minLength: 1
34
- }
23
+ schedule: {
24
+ maxLength: 255,
25
+ minLength: 1
26
+ },
27
+ timezone: {
28
+ maxLength: 255,
29
+ minLength: 1
30
+ }
35
31
  };
32
+ const CreateJobDefinitionSecretsRequestSecretConfig = { secretManagerVersion: { minLength: 1 } };
36
33
  const CronSchedule = {
37
- schedule: {
38
- maxLength: 255,
39
- minLength: 1
40
- },
41
- timezone: {
42
- maxLength: 255,
43
- minLength: 1
44
- }
34
+ schedule: {
35
+ maxLength: 255,
36
+ minLength: 1
37
+ },
38
+ timezone: {
39
+ maxLength: 255,
40
+ minLength: 1
41
+ }
45
42
  };
46
43
  const ListJobDefinitionsRequest = {
47
- page: {
48
- greaterThanOrEqual: 1
49
- },
50
- pageSize: {
51
- greaterThanOrEqual: 1,
52
- lessThanOrEqual: 1e3
53
- }
44
+ page: { greaterThanOrEqual: 1 },
45
+ pageSize: {
46
+ greaterThanOrEqual: 1,
47
+ lessThanOrEqual: 1e3
48
+ }
54
49
  };
55
50
  const ListJobRunsRequest = {
56
- page: {
57
- greaterThanOrEqual: 1
58
- },
59
- pageSize: {
60
- greaterThanOrEqual: 1,
61
- lessThanOrEqual: 1e3
62
- }
63
- };
64
- const StartJobDefinitionRequest = {
65
- replicas: {
66
- greaterThan: 0
67
- }
51
+ page: { greaterThanOrEqual: 1 },
52
+ pageSize: {
53
+ greaterThanOrEqual: 1,
54
+ lessThanOrEqual: 1e3
55
+ }
68
56
  };
57
+ const StartJobDefinitionRequest = { replicas: { greaterThan: 0 } };
69
58
  const UpdateJobDefinitionRequest = {
70
- cpuLimit: {
71
- greaterThan: 0
72
- },
73
- description: {
74
- maxLength: 255
75
- },
76
- imageUri: {
77
- pattern: /^((?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*)(?::(\w[A-Za-z0-9_.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$/
78
- },
79
- localStorageCapacity: {
80
- greaterThan: 0
81
- },
82
- memoryLimit: {
83
- greaterThan: 0
84
- },
85
- name: {
86
- pattern: /^[A-Za-z0-9-_]{3,50}$/
87
- }
59
+ cpuLimit: { greaterThan: 0 },
60
+ description: { maxLength: 255 },
61
+ imageUri: { pattern: /^((?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*)(?::(\w[A-Za-z0-9_.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$/ },
62
+ localStorageCapacity: { greaterThan: 0 },
63
+ memoryLimit: { greaterThan: 0 },
64
+ name: { pattern: /^[A-Za-z0-9-_]{3,50}$/ }
88
65
  };
89
66
  const UpdateJobDefinitionRequestCronScheduleConfig = {
90
- schedule: {
91
- maxLength: 255,
92
- minLength: 1
93
- },
94
- timezone: {
95
- maxLength: 255,
96
- minLength: 1
97
- }
98
- };
99
- const UpdateJobDefinitionSecretRequest = {
100
- secretManagerVersion: {
101
- minLength: 1
102
- }
103
- };
104
- export {
105
- CreateJobDefinitionRequest,
106
- CreateJobDefinitionRequestCronScheduleConfig,
107
- CreateJobDefinitionSecretsRequestSecretConfig,
108
- CronSchedule,
109
- ListJobDefinitionsRequest,
110
- ListJobRunsRequest,
111
- StartJobDefinitionRequest,
112
- UpdateJobDefinitionRequest,
113
- UpdateJobDefinitionRequestCronScheduleConfig,
114
- UpdateJobDefinitionSecretRequest
67
+ schedule: {
68
+ maxLength: 255,
69
+ minLength: 1
70
+ },
71
+ timezone: {
72
+ maxLength: 255,
73
+ minLength: 1
74
+ }
115
75
  };
76
+ const UpdateJobDefinitionSecretRequest = { secretManagerVersion: { minLength: 1 } };
77
+ export { validation_rules_gen_exports };