@scaleway/sdk-jobs 2.5.0 → 2.7.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,252 +1,130 @@
1
1
  import { marshalCreateJobDefinitionRequest, marshalCreateSecretsRequest, marshalCreateTriggerRequest, marshalStartJobDefinitionRequest, marshalUpdateJobDefinitionRequest, marshalUpdateSecretRequest, marshalUpdateTriggerRequest, unmarshalCreateSecretsResponse, unmarshalJobDefinition, unmarshalJobLimits, unmarshalJobRun, unmarshalListJobDefinitionsResponse, unmarshalListJobResourcesResponse, unmarshalListJobRunsResponse, unmarshalListSecretsResponse, unmarshalListTriggersResponse, unmarshalSecret, unmarshalStartJobDefinitionResponse, unmarshalTrigger } from "./marshalling.gen.js";
2
2
  import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
3
3
  //#region src/v1alpha2/api.gen.ts
4
- var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
4
+ const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
5
5
  /**
6
6
  * Serverless Jobs API.
7
7
 
8
8
  This API allows you to manage your Serverless Jobs.
9
9
  */
10
10
  var API = class extends API$1 {
11
- /**
12
- * Locality of this API.
13
- * type {'zone','region','global','unspecified'}
14
- */
15
- static LOCALITY = toApiLocality({ regions: [
16
- "fr-par",
17
- "nl-ams",
18
- "pl-waw"
19
- ] });
20
- /**
21
- * Create a new job definition in a specified Project.
22
- *
23
- * @param request - The request {@link CreateJobDefinitionRequest}
24
- * @returns A Promise of JobDefinition
25
- */
26
- createJobDefinition = (request) => this.client.fetch({
27
- body: JSON.stringify(marshalCreateJobDefinitionRequest(request, this.client.settings)),
28
- headers: jsonContentHeaders,
29
- method: "POST",
30
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions`
31
- }, unmarshalJobDefinition);
32
- /**
33
- * Get a job definition by its unique identifier.
34
- *
35
- * @param request - The request {@link GetJobDefinitionRequest}
36
- * @returns A Promise of JobDefinition
37
- */
38
- getJobDefinition = (request) => this.client.fetch({
39
- method: "GET",
40
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam("jobDefinitionId", request.jobDefinitionId)}`
41
- }, unmarshalJobDefinition);
42
- pageOfListJobDefinitions = (request = {}) => this.client.fetch({
43
- method: "GET",
44
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions`,
45
- urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
46
- }, unmarshalListJobDefinitionsResponse);
47
- /**
48
- * List all your job definitions with filters.
49
- *
50
- * @param request - The request {@link ListJobDefinitionsRequest}
51
- * @returns A Promise of ListJobDefinitionsResponse
52
- */
53
- listJobDefinitions = (request = {}) => enrichForPagination("jobDefinitions", this.pageOfListJobDefinitions, request);
54
- /**
55
- * Update an existing job definition associated with the specified unique identifier.
56
- *
57
- * @param request - The request {@link UpdateJobDefinitionRequest}
58
- * @returns A Promise of JobDefinition
59
- */
60
- updateJobDefinition = (request) => this.client.fetch({
61
- body: JSON.stringify(marshalUpdateJobDefinitionRequest(request, this.client.settings)),
62
- headers: jsonContentHeaders,
63
- method: "PATCH",
64
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam("jobDefinitionId", request.jobDefinitionId)}`
65
- }, unmarshalJobDefinition);
66
- /**
67
- * Delete an existing job definition by its unique identifier.
68
- *
69
- * @param request - The request {@link DeleteJobDefinitionRequest}
70
- */
71
- deleteJobDefinition = (request) => this.client.fetch({
72
- method: "DELETE",
73
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam("jobDefinitionId", request.jobDefinitionId)}`
74
- });
75
- /**
76
- * Run an existing job definition using its unique identifier and create a new job run.
77
- *
78
- * @param request - The request {@link StartJobDefinitionRequest}
79
- * @returns A Promise of StartJobDefinitionResponse
80
- */
81
- startJobDefinition = (request) => this.client.fetch({
82
- body: JSON.stringify(marshalStartJobDefinitionRequest(request, this.client.settings)),
83
- headers: jsonContentHeaders,
84
- method: "POST",
85
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam("jobDefinitionId", request.jobDefinitionId)}/start`
86
- }, unmarshalStartJobDefinitionResponse);
87
- /**
88
- * Get a job run by its unique identifier.
89
- *
90
- * @param request - The request {@link GetJobRunRequest}
91
- * @returns A Promise of JobRun
92
- */
93
- getJobRun = (request) => this.client.fetch({
94
- method: "GET",
95
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-runs/${validatePathParam("jobRunId", request.jobRunId)}`
96
- }, unmarshalJobRun);
97
- pageOfListJobRuns = (request = {}) => this.client.fetch({
98
- method: "GET",
99
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-runs`,
100
- urlParams: urlParams(["job_definition_id", request.jobDefinitionId], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["reasons", request.reasons], ["state", request.state], ["states", request.states])
101
- }, unmarshalListJobRunsResponse);
102
- /**
103
- * List all job runs with filters.
104
- *
105
- * @param request - The request {@link ListJobRunsRequest}
106
- * @returns A Promise of ListJobRunsResponse
107
- */
108
- listJobRuns = (request = {}) => enrichForPagination("jobRuns", this.pageOfListJobRuns, request);
109
- /**
110
- * Stop a job run using its unique identifier.
111
- *
112
- * @param request - The request {@link StopJobRunRequest}
113
- * @returns A Promise of JobRun
114
- */
115
- stopJobRun = (request) => this.client.fetch({
116
- body: "{}",
117
- headers: jsonContentHeaders,
118
- method: "POST",
119
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-runs/${validatePathParam("jobRunId", request.jobRunId)}/stop`
120
- }, unmarshalJobRun);
121
- /**
122
- * Create a secret reference within a job definition.
123
- *
124
- * @param request - The request {@link CreateSecretsRequest}
125
- * @returns A Promise of CreateSecretsResponse
126
- */
127
- createSecrets = (request) => this.client.fetch({
128
- body: JSON.stringify(marshalCreateSecretsRequest(request, this.client.settings)),
129
- headers: jsonContentHeaders,
130
- method: "POST",
131
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets`
132
- }, unmarshalCreateSecretsResponse);
133
- /**
134
- * Get a secret references within a job definition.
135
- *
136
- * @param request - The request {@link GetSecretRequest}
137
- * @returns A Promise of Secret
138
- */
139
- getSecret = (request) => this.client.fetch({
140
- method: "GET",
141
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}`
142
- }, unmarshalSecret);
143
- /**
144
- * List secrets references within a job definition.
145
- *
146
- * @param request - The request {@link ListSecretsRequest}
147
- * @returns A Promise of ListSecretsResponse
148
- */
149
- listSecrets = (request) => this.client.fetch({
150
- method: "GET",
151
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets`,
152
- urlParams: urlParams(["job_definition_id", request.jobDefinitionId])
153
- }, unmarshalListSecretsResponse);
154
- /**
155
- * Update a secret reference within a job definition.
156
- *
157
- * @param request - The request {@link UpdateSecretRequest}
158
- * @returns A Promise of Secret
159
- */
160
- updateSecret = (request) => this.client.fetch({
161
- body: JSON.stringify(marshalUpdateSecretRequest(request, this.client.settings)),
162
- headers: jsonContentHeaders,
163
- method: "PATCH",
164
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}`
165
- }, unmarshalSecret);
166
- /**
167
- * Delete a secret reference within a job definition.
168
- *
169
- * @param request - The request {@link DeleteSecretRequest}
170
- */
171
- deleteSecret = (request) => this.client.fetch({
172
- method: "DELETE",
173
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}`
174
- });
175
- /**
176
- * Create a trigger.
177
- *
178
- * @param request - The request {@link CreateTriggerRequest}
179
- * @returns A Promise of Trigger
180
- */
181
- createTrigger = (request) => this.client.fetch({
182
- body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
183
- headers: jsonContentHeaders,
184
- method: "POST",
185
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`
186
- }, unmarshalTrigger);
187
- /**
188
- * Get a trigger.
189
- *
190
- * @param request - The request {@link GetTriggerRequest}
191
- * @returns A Promise of Trigger
192
- */
193
- getTrigger = (request) => this.client.fetch({
194
- method: "GET",
195
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
196
- }, unmarshalTrigger);
197
- pageOfListTriggers = (request) => this.client.fetch({
198
- method: "GET",
199
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`,
200
- urlParams: urlParams(["job_definition_id", request.jobDefinitionId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
201
- }, unmarshalListTriggersResponse);
202
- /**
203
- * List triggers of a job definition.
204
- *
205
- * @param request - The request {@link ListTriggersRequest}
206
- * @returns A Promise of ListTriggersResponse
207
- */
208
- listTriggers = (request) => enrichForPagination("triggers", this.pageOfListTriggers, request);
209
- /**
210
- * Update a trigger.
211
- *
212
- * @param request - The request {@link UpdateTriggerRequest}
213
- * @returns A Promise of Trigger
214
- */
215
- updateTrigger = (request) => this.client.fetch({
216
- body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
217
- headers: jsonContentHeaders,
218
- method: "PATCH",
219
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
220
- }, unmarshalTrigger);
221
- /**
222
- * Delete a trigger.
223
- *
224
- * @param request - The request {@link DeleteTriggerRequest}
225
- */
226
- deleteTrigger = (request) => this.client.fetch({
227
- method: "DELETE",
228
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
229
- });
230
- /**
231
- * List job resources for the console.
232
- *
233
- * @param request - The request {@link ListJobResourcesRequest}
234
- * @returns A Promise of ListJobResourcesResponse
235
- */
236
- listJobResources = (request = {}) => this.client.fetch({
237
- method: "GET",
238
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-resources`
239
- }, unmarshalListJobResourcesResponse);
240
- /**
241
- * Get job limits for the console.
242
- *
243
- * @param request - The request {@link GetJobLimitsRequest}
244
- * @returns A Promise of JobLimits
245
- */
246
- getJobLimits = (request = {}) => this.client.fetch({
247
- method: "GET",
248
- path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-limits`
249
- }, unmarshalJobLimits);
11
+ constructor(..._args) {
12
+ super(..._args);
13
+ this.createJobDefinition = (request) => this.client.fetch({
14
+ body: JSON.stringify(marshalCreateJobDefinitionRequest(request, this.client.settings)),
15
+ headers: jsonContentHeaders,
16
+ method: "POST",
17
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions`
18
+ }, unmarshalJobDefinition);
19
+ this.getJobDefinition = (request) => this.client.fetch({
20
+ method: "GET",
21
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam("jobDefinitionId", request.jobDefinitionId)}`
22
+ }, unmarshalJobDefinition);
23
+ this.pageOfListJobDefinitions = (request = {}) => this.client.fetch({
24
+ method: "GET",
25
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions`,
26
+ urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
27
+ }, unmarshalListJobDefinitionsResponse);
28
+ this.listJobDefinitions = (request = {}) => enrichForPagination("jobDefinitions", this.pageOfListJobDefinitions, request);
29
+ this.updateJobDefinition = (request) => this.client.fetch({
30
+ body: JSON.stringify(marshalUpdateJobDefinitionRequest(request, this.client.settings)),
31
+ headers: jsonContentHeaders,
32
+ method: "PATCH",
33
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam("jobDefinitionId", request.jobDefinitionId)}`
34
+ }, unmarshalJobDefinition);
35
+ this.deleteJobDefinition = (request) => this.client.fetch({
36
+ method: "DELETE",
37
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam("jobDefinitionId", request.jobDefinitionId)}`
38
+ });
39
+ this.startJobDefinition = (request) => this.client.fetch({
40
+ body: JSON.stringify(marshalStartJobDefinitionRequest(request, this.client.settings)),
41
+ headers: jsonContentHeaders,
42
+ method: "POST",
43
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam("jobDefinitionId", request.jobDefinitionId)}/start`
44
+ }, unmarshalStartJobDefinitionResponse);
45
+ this.getJobRun = (request) => this.client.fetch({
46
+ method: "GET",
47
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-runs/${validatePathParam("jobRunId", request.jobRunId)}`
48
+ }, unmarshalJobRun);
49
+ this.pageOfListJobRuns = (request = {}) => this.client.fetch({
50
+ method: "GET",
51
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-runs`,
52
+ urlParams: urlParams(["job_definition_id", request.jobDefinitionId], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["reasons", request.reasons], ["state", request.state], ["states", request.states])
53
+ }, unmarshalListJobRunsResponse);
54
+ this.listJobRuns = (request = {}) => enrichForPagination("jobRuns", this.pageOfListJobRuns, request);
55
+ this.stopJobRun = (request) => this.client.fetch({
56
+ body: "{}",
57
+ headers: jsonContentHeaders,
58
+ method: "POST",
59
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-runs/${validatePathParam("jobRunId", request.jobRunId)}/stop`
60
+ }, unmarshalJobRun);
61
+ this.createSecrets = (request) => this.client.fetch({
62
+ body: JSON.stringify(marshalCreateSecretsRequest(request, this.client.settings)),
63
+ headers: jsonContentHeaders,
64
+ method: "POST",
65
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets`
66
+ }, unmarshalCreateSecretsResponse);
67
+ this.getSecret = (request) => this.client.fetch({
68
+ method: "GET",
69
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}`
70
+ }, unmarshalSecret);
71
+ this.listSecrets = (request) => this.client.fetch({
72
+ method: "GET",
73
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets`,
74
+ urlParams: urlParams(["job_definition_id", request.jobDefinitionId])
75
+ }, unmarshalListSecretsResponse);
76
+ this.updateSecret = (request) => this.client.fetch({
77
+ body: JSON.stringify(marshalUpdateSecretRequest(request, this.client.settings)),
78
+ headers: jsonContentHeaders,
79
+ method: "PATCH",
80
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}`
81
+ }, unmarshalSecret);
82
+ this.deleteSecret = (request) => this.client.fetch({
83
+ method: "DELETE",
84
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}`
85
+ });
86
+ this.createTrigger = (request) => this.client.fetch({
87
+ body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
88
+ headers: jsonContentHeaders,
89
+ method: "POST",
90
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`
91
+ }, unmarshalTrigger);
92
+ this.getTrigger = (request) => this.client.fetch({
93
+ method: "GET",
94
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
95
+ }, unmarshalTrigger);
96
+ this.pageOfListTriggers = (request) => this.client.fetch({
97
+ method: "GET",
98
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`,
99
+ urlParams: urlParams(["job_definition_id", request.jobDefinitionId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
100
+ }, unmarshalListTriggersResponse);
101
+ this.listTriggers = (request) => enrichForPagination("triggers", this.pageOfListTriggers, request);
102
+ this.updateTrigger = (request) => this.client.fetch({
103
+ body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
104
+ headers: jsonContentHeaders,
105
+ method: "PATCH",
106
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
107
+ }, unmarshalTrigger);
108
+ this.deleteTrigger = (request) => this.client.fetch({
109
+ method: "DELETE",
110
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
111
+ });
112
+ this.listJobResources = (request = {}) => this.client.fetch({
113
+ method: "GET",
114
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-resources`
115
+ }, unmarshalListJobResourcesResponse);
116
+ this.getJobLimits = (request = {}) => this.client.fetch({
117
+ method: "GET",
118
+ path: `/serverless-jobs/v1alpha2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-limits`
119
+ }, unmarshalJobLimits);
120
+ }
121
+ static {
122
+ this.LOCALITY = toApiLocality({ regions: [
123
+ "fr-par",
124
+ "nl-ams",
125
+ "pl-waw"
126
+ ] });
127
+ }
250
128
  };
251
129
  //#endregion
252
130
  export { API };
@@ -1,6 +1,6 @@
1
1
  //#region src/v1alpha2/content.gen.ts
2
2
  /** Lists transient statutes of the enum {@link JobRunState}. */
3
- var JOB_RUN_TRANSIENT_STATUSES = [
3
+ const JOB_RUN_TRANSIENT_STATUSES = [
4
4
  "initialized",
5
5
  "validated",
6
6
  "queued",
@@ -1,15 +1,15 @@
1
1
  import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
2
  import randomName from "@scaleway/random-name";
3
3
  //#region src/v1alpha2/marshalling.gen.ts
4
- var unmarshalSecretEnvVar = (data) => {
4
+ const unmarshalSecretEnvVar = (data) => {
5
5
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SecretEnvVar' failed as data isn't a dictionary.`);
6
6
  return { name: data.name };
7
7
  };
8
- var unmarshalSecretFile = (data) => {
8
+ const unmarshalSecretFile = (data) => {
9
9
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SecretFile' failed as data isn't a dictionary.`);
10
10
  return { path: data.path };
11
11
  };
12
- var unmarshalSecret = (data) => {
12
+ const unmarshalSecret = (data) => {
13
13
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Secret' failed as data isn't a dictionary.`);
14
14
  return {
15
15
  envVar: data.env_var ? unmarshalSecretEnvVar(data.env_var) : void 0,
@@ -20,18 +20,18 @@ var unmarshalSecret = (data) => {
20
20
  secretManagerVersion: data.secret_manager_version
21
21
  };
22
22
  };
23
- var unmarshalCronSchedule = (data) => {
23
+ const unmarshalCronSchedule = (data) => {
24
24
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CronSchedule' failed as data isn't a dictionary.`);
25
25
  return {
26
26
  schedule: data.schedule,
27
27
  timezone: data.timezone
28
28
  };
29
29
  };
30
- var unmarshalRetryPolicy = (data) => {
30
+ const unmarshalRetryPolicy = (data) => {
31
31
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RetryPolicy' failed as data isn't a dictionary.`);
32
32
  return { maxRetries: data.max_retries };
33
33
  };
34
- var unmarshalJobDefinition = (data) => {
34
+ const unmarshalJobDefinition = (data) => {
35
35
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobDefinition' failed as data isn't a dictionary.`);
36
36
  return {
37
37
  args: data.args,
@@ -54,7 +54,7 @@ var unmarshalJobDefinition = (data) => {
54
54
  updatedAt: unmarshalDate(data.updated_at)
55
55
  };
56
56
  };
57
- var unmarshalJobRun = (data) => {
57
+ const unmarshalJobRun = (data) => {
58
58
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobRun' failed as data isn't a dictionary.`);
59
59
  return {
60
60
  args: data.args,
@@ -79,7 +79,7 @@ var unmarshalJobRun = (data) => {
79
79
  updatedAt: unmarshalDate(data.updated_at)
80
80
  };
81
81
  };
82
- var unmarshalTriggerCronConfig = (data) => {
82
+ const unmarshalTriggerCronConfig = (data) => {
83
83
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'TriggerCronConfig' failed as data isn't a dictionary.`);
84
84
  return {
85
85
  args: data.args,
@@ -88,7 +88,7 @@ var unmarshalTriggerCronConfig = (data) => {
88
88
  timezone: data.timezone
89
89
  };
90
90
  };
91
- var unmarshalTrigger = (data) => {
91
+ const unmarshalTrigger = (data) => {
92
92
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Trigger' failed as data isn't a dictionary.`);
93
93
  return {
94
94
  createdAt: unmarshalDate(data.created_at),
@@ -99,63 +99,63 @@ var unmarshalTrigger = (data) => {
99
99
  updatedAt: unmarshalDate(data.updated_at)
100
100
  };
101
101
  };
102
- var unmarshalCreateSecretsResponse = (data) => {
102
+ const unmarshalCreateSecretsResponse = (data) => {
103
103
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CreateSecretsResponse' failed as data isn't a dictionary.`);
104
104
  return { secrets: unmarshalArrayOfObject(data.secrets, unmarshalSecret) };
105
105
  };
106
- var unmarshalJobLimits = (data) => {
106
+ const unmarshalJobLimits = (data) => {
107
107
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobLimits' failed as data isn't a dictionary.`);
108
108
  return { secretsPerJobDefinition: data.secrets_per_job_definition };
109
109
  };
110
- var unmarshalListJobDefinitionsResponse = (data) => {
110
+ const unmarshalListJobDefinitionsResponse = (data) => {
111
111
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobDefinitionsResponse' failed as data isn't a dictionary.`);
112
112
  return {
113
113
  jobDefinitions: unmarshalArrayOfObject(data.job_definitions, unmarshalJobDefinition),
114
114
  totalCount: data.total_count
115
115
  };
116
116
  };
117
- var unmarshalResource = (data) => {
117
+ const unmarshalResource = (data) => {
118
118
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Resource' failed as data isn't a dictionary.`);
119
119
  return {
120
120
  computeLimitMvcpu: data.compute_limit_mvcpu,
121
121
  memoryLimitBytes: data.memory_limit_bytes
122
122
  };
123
123
  };
124
- var unmarshalListJobResourcesResponse = (data) => {
124
+ const unmarshalListJobResourcesResponse = (data) => {
125
125
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobResourcesResponse' failed as data isn't a dictionary.`);
126
126
  return { resources: unmarshalArrayOfObject(data.resources, unmarshalResource) };
127
127
  };
128
- var unmarshalListJobRunsResponse = (data) => {
128
+ const unmarshalListJobRunsResponse = (data) => {
129
129
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobRunsResponse' failed as data isn't a dictionary.`);
130
130
  return {
131
131
  jobRuns: unmarshalArrayOfObject(data.job_runs, unmarshalJobRun),
132
132
  totalCount: data.total_count
133
133
  };
134
134
  };
135
- var unmarshalListSecretsResponse = (data) => {
135
+ const unmarshalListSecretsResponse = (data) => {
136
136
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSecretsResponse' failed as data isn't a dictionary.`);
137
137
  return {
138
138
  secrets: unmarshalArrayOfObject(data.secrets, unmarshalSecret),
139
139
  totalCount: data.total_count
140
140
  };
141
141
  };
142
- var unmarshalListTriggersResponse = (data) => {
142
+ const unmarshalListTriggersResponse = (data) => {
143
143
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListTriggersResponse' failed as data isn't a dictionary.`);
144
144
  return {
145
145
  totalCount: data.total_count,
146
146
  triggers: unmarshalArrayOfObject(data.triggers, unmarshalTrigger)
147
147
  };
148
148
  };
149
- var unmarshalStartJobDefinitionResponse = (data) => {
149
+ const unmarshalStartJobDefinitionResponse = (data) => {
150
150
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'StartJobDefinitionResponse' failed as data isn't a dictionary.`);
151
151
  return { jobRuns: unmarshalArrayOfObject(data.job_runs, unmarshalJobRun) };
152
152
  };
153
- var marshalCreateJobDefinitionRequestCronScheduleConfig = (request, defaults) => ({
153
+ const marshalCreateJobDefinitionRequestCronScheduleConfig = (request, defaults) => ({
154
154
  schedule: request.schedule,
155
155
  timezone: request.timezone
156
156
  });
157
- var marshalRetryPolicy = (request, defaults) => ({ max_retries: request.maxRetries });
158
- var marshalCreateJobDefinitionRequest = (request, defaults) => ({
157
+ const marshalRetryPolicy = (request, defaults) => ({ max_retries: request.maxRetries });
158
+ const marshalCreateJobDefinitionRequest = (request, defaults) => ({
159
159
  args: request.args,
160
160
  command: request.command,
161
161
  cpu_limit: request.cpuLimit,
@@ -171,7 +171,7 @@ var marshalCreateJobDefinitionRequest = (request, defaults) => ({
171
171
  retry_policy: request.retryPolicy !== void 0 ? marshalRetryPolicy(request.retryPolicy, defaults) : void 0,
172
172
  startup_command: request.startupCommand
173
173
  });
174
- var marshalCreateSecretsRequestSecretConfig = (request, defaults) => ({
174
+ const marshalCreateSecretsRequestSecretConfig = (request, defaults) => ({
175
175
  secret_manager_id: request.secretManagerId,
176
176
  secret_manager_version: request.secretManagerVersion,
177
177
  ...resolveOneOf([{
@@ -182,17 +182,17 @@ var marshalCreateSecretsRequestSecretConfig = (request, defaults) => ({
182
182
  value: request.envVarName
183
183
  }])
184
184
  });
185
- var marshalCreateSecretsRequest = (request, defaults) => ({
185
+ const marshalCreateSecretsRequest = (request, defaults) => ({
186
186
  job_definition_id: request.jobDefinitionId,
187
187
  secrets: request.secrets.map((elt) => marshalCreateSecretsRequestSecretConfig(elt, defaults))
188
188
  });
189
- var marshalCreateTriggerRequestCronConfig = (request, defaults) => ({
189
+ const marshalCreateTriggerRequestCronConfig = (request, defaults) => ({
190
190
  args: request.args,
191
191
  schedule: request.schedule,
192
192
  startup_command: request.startupCommand,
193
193
  timezone: request.timezone
194
194
  });
195
- var marshalCreateTriggerRequest = (request, defaults) => ({
195
+ const marshalCreateTriggerRequest = (request, defaults) => ({
196
196
  job_definition_id: request.jobDefinitionId,
197
197
  name: request.name,
198
198
  ...resolveOneOf([{
@@ -200,18 +200,18 @@ var marshalCreateTriggerRequest = (request, defaults) => ({
200
200
  value: request.cronConfig !== void 0 ? marshalCreateTriggerRequestCronConfig(request.cronConfig, defaults) : void 0
201
201
  }])
202
202
  });
203
- var marshalStartJobDefinitionRequest = (request, defaults) => ({
203
+ const marshalStartJobDefinitionRequest = (request, defaults) => ({
204
204
  args: request.args,
205
205
  command: request.command,
206
206
  environment_variables: request.environmentVariables,
207
207
  replicas: request.replicas,
208
208
  startup_command: request.startupCommand
209
209
  });
210
- var marshalUpdateJobDefinitionRequestCronScheduleConfig = (request, defaults) => ({
210
+ const marshalUpdateJobDefinitionRequestCronScheduleConfig = (request, defaults) => ({
211
211
  schedule: request.schedule,
212
212
  timezone: request.timezone
213
213
  });
214
- var marshalUpdateJobDefinitionRequest = (request, defaults) => ({
214
+ const marshalUpdateJobDefinitionRequest = (request, defaults) => ({
215
215
  args: request.args,
216
216
  command: request.command,
217
217
  cpu_limit: request.cpuLimit,
@@ -226,7 +226,7 @@ var marshalUpdateJobDefinitionRequest = (request, defaults) => ({
226
226
  retry_policy: request.retryPolicy !== void 0 ? marshalRetryPolicy(request.retryPolicy, defaults) : void 0,
227
227
  startup_command: request.startupCommand
228
228
  });
229
- var marshalUpdateSecretRequest = (request, defaults) => ({
229
+ const marshalUpdateSecretRequest = (request, defaults) => ({
230
230
  secret_manager_version: request.secretManagerVersion,
231
231
  ...resolveOneOf([{
232
232
  param: "path",
@@ -236,13 +236,13 @@ var marshalUpdateSecretRequest = (request, defaults) => ({
236
236
  value: request.envVarName
237
237
  }])
238
238
  });
239
- var marshalUpdateTriggerRequestCronConfig = (request, defaults) => ({
239
+ const marshalUpdateTriggerRequestCronConfig = (request, defaults) => ({
240
240
  args: request.args,
241
241
  schedule: request.schedule,
242
242
  startup_command: request.startupCommand,
243
243
  timezone: request.timezone
244
244
  });
245
- var marshalUpdateTriggerRequest = (request, defaults) => ({
245
+ const marshalUpdateTriggerRequest = (request, defaults) => ({
246
246
  name: request.name,
247
247
  ...resolveOneOf([{
248
248
  param: "cron_config",
@@ -1,5 +1,5 @@
1
1
  //#region src/v1alpha2/metadata.gen.ts
2
- var queriesMetadata = {
2
+ const queriesMetadata = {
3
3
  namespace: "jobs",
4
4
  version: "v1alpha2",
5
5
  folderName: "jobsv1alpha2",