@maxim_mazurok/gapi.client.batch-v1 0.0.20231103 → 0.0.20231122

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.
package/index.d.ts CHANGED
@@ -9,1742 +9,1085 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://batch.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20231103
12
+ // Revision: 20231122
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
16
16
  declare namespace gapi.client {
17
- /** Load Batch API v1 */
18
- function load(urlOrObject: "https://batch.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
19
- /** @deprecated Please load APIs with discovery documents. */
20
- function load(name: "batch", version: "v1"): Promise<void>;
21
- /** @deprecated Please load APIs with discovery documents. */
22
- function load(name: "batch", version: "v1", callback: () => any): void;
17
+ /** Load Batch API v1 */
18
+ function load(
19
+ urlOrObject: 'https://batch.googleapis.com/$discovery/rest?version=v1'
20
+ ): Promise<void>;
21
+ /** @deprecated Please load APIs with discovery documents. */
22
+ function load(name: 'batch', version: 'v1'): Promise<void>;
23
+ /** @deprecated Please load APIs with discovery documents. */
24
+ function load(name: 'batch', version: 'v1', callback: () => any): void;
23
25
 
24
- namespace batch {
25
- interface Accelerator {
26
- /** The number of accelerators of this type. */
27
- count?:
28
- string;
29
- /**
30
- * Optional. The NVIDIA GPU driver version that should be installed for this type. You can define the specific driver version such as "470.103.01", following the driver version
31
- * requirements in https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. Batch will install the specific accelerator driver if qualified.
32
- */
33
- driverVersion?:
34
- string;
35
- /** Deprecated: please use instances[0].install_gpu_drivers instead. */
36
- installGpuDrivers?:
37
- boolean;
38
- /** The accelerator type. For example, "nvidia-tesla-t4". See `gcloud compute accelerator-types list`. */
39
- type?:
40
- string;
41
- }
42
- interface ActionCondition {
43
- /** Exit codes of a task execution. If there are more than 1 exit codes, when task executes with any of the exit code in the list, the condition is met and the action will be executed. */
44
- exitCodes?:
45
- number[];
46
- }
47
- interface AgentContainer {
48
- /**
49
- * Overrides the `CMD` specified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments
50
- * to the ENTRYPOINT.
51
- */
52
- commands?:
53
- string[];
54
- /** Overrides the `ENTRYPOINT` specified in the container. */
55
- entrypoint?:
56
- string;
57
- /** The URI to pull the container image from. */
58
- imageUri?:
59
- string;
60
- /** Arbitrary additional options to include in the "docker run" command when running this container, e.g. "--network host". */
61
- options?:
62
- string;
63
- /** Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro */
64
- volumes?:
65
- string[];
66
- }
67
- interface AgentEnvironment {
68
- /** An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values. */
69
- encryptedVariables?:
70
- AgentKMSEnvMap;
71
- /** A map of environment variable names to Secret Manager secret names. The VM will access the named secrets to set the value of each environment variable. */
72
- secretVariables?:
73
- { [P in string]: string };
74
- /** A map of environment variable names to values. */
75
- variables?:
76
- { [P in string]: string };
77
- }
78
- interface AgentInfo {
79
- /** Optional. The assigned Job ID */
80
- jobId?:
81
- string;
82
- /** When the AgentInfo is generated. */
83
- reportTime?:
84
- string;
85
- /** Agent state. */
86
- state?:
87
- string;
88
- /** The assigned task group ID. */
89
- taskGroupId?:
90
- string;
91
- /** Task Info. */
92
- tasks?:
93
- AgentTaskInfo[];
94
- }
95
- interface AgentKMSEnvMap {
96
- /** The value of the cipherText response from the `encrypt` method. */
97
- cipherText?:
98
- string;
99
- /** The name of the KMS key that will be used to decrypt the cipher text. */
100
- keyName?:
101
- string;
102
- }
103
- interface AgentMetadata {
104
- /** When the VM agent started. Use agent_startup_time instead. */
105
- creationTime?:
106
- string;
107
- /**
108
- * Full name of the entity that created this vm. For MIG, this path is: projects/{project}/regions/{region}/InstanceGroupManagers/{igm} The value is retrieved from the vm metadata key
109
- * of "created-by".
110
- */
111
- creator?:
112
- string;
113
- /** image version for the VM that this agent is installed on. */
114
- imageVersion?:
115
- string;
116
- /** GCP instance name (go/instance-name). */
117
- instance?:
118
- string;
119
- /** GCP instance ID (go/instance-id). */
120
- instanceId?:
121
- string;
122
- /** If the GCP instance has received preemption notice. */
123
- instancePreemptionNoticeReceived?:
124
- boolean;
125
- /** parsed contents of /etc/os-release */
126
- osRelease?:
127
- { [P in string]: string };
128
- /** agent binary version running on VM */
129
- version?:
130
- string;
131
- /** Agent zone. */
132
- zone?:
133
- string;
134
- }
135
- interface AgentScript {
136
- /**
137
- * Script file path on the host VM. To specify an interpreter, please add a `#!`(also known as [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the
138
- * file.(For example, to execute the script using bash, `#!/bin/bash` should be the first line of the file. To execute the script using`Python3`, `#!/usr/bin/env python3` should be the
139
- * first line of the file.) Otherwise, the file will by default be excuted by `/bin/sh`.
140
- */
141
- path?:
142
- string;
143
- /**
144
- * Shell script text. To specify an interpreter, please add a `#!\n` at the beginning of the text.(For example, to execute the script using bash, `#!/bin/bash\n` should be added. To
145
- * execute the script using`Python3`, `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by default be excuted by `/bin/sh`.
146
- */
147
- text?:
148
- string;
149
- }
150
- interface AgentTask {
151
- /**
152
- * AgentTaskSpec is the taskSpec representation between Agent and CLH communication. This field will replace the TaskSpec field above in future to have a better separation between
153
- * user-facaing API and internal API.
154
- */
155
- agentTaskSpec?:
156
- AgentTaskSpec;
157
- /** The intended state of the task. */
158
- intendedState?:
159
- string;
160
- /** The highest barrier reached by all tasks in the task's TaskGroup. */
161
- reachedBarrier?:
162
- string;
163
- /** Task Spec. This field will be replaced by agent_task_spec below in future. */
164
- spec?:
165
- TaskSpec;
166
- /** Task status. */
167
- status?:
168
- TaskStatus;
169
- /** Task name. */
170
- task?:
171
- string;
172
- /** TaskSource represents the source of the task. */
173
- taskSource?:
174
- string;
175
- }
176
- interface AgentTaskInfo {
177
- /** The highest index of a runnable started by the agent for this task. The runnables are indexed from 1. Value 0 is undefined. */
178
- runnable?:
179
- string;
180
- /** ID of the Task */
181
- taskId?:
182
- string;
183
- /** The status of the Task. If we need agent specific fields we should fork the public TaskStatus into an agent specific one. Or add them below. */
184
- taskStatus?:
185
- TaskStatus;
186
- }
187
- interface AgentTaskRunnable {
188
- /**
189
- * By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for
190
- * Runnables that copy output files off of the VM or for debugging. The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then
191
- * no further Runnables will execute, not even always_run Runnables.
192
- */
193
- alwaysRun?:
194
- boolean;
195
- /**
196
- * This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide
197
- * debugging support tools like SSH servers).
198
- */
199
- background?:
200
- boolean;
201
- /** Container runnable. */
202
- container?:
203
- AgentContainer;
204
- /** Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup). */
205
- environment?:
206
- AgentEnvironment;
207
- /** Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead. */
208
- ignoreExitStatus?:
209
- boolean;
210
- /** Script runnable. */
211
- script?:
212
- AgentScript;
213
- /** Timeout for this Runnable. */
214
- timeout?:
215
- string;
216
- }
217
- interface AgentTaskSpec {
218
- /** Environment variables to set before running the Task. */
219
- environment?:
220
- AgentEnvironment;
221
- /** Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit. */
222
- maxRunDuration?:
223
- string;
224
- /** AgentTaskRunnable is runanbles that will be executed on the agent. */
225
- runnables?:
226
- AgentTaskRunnable[];
227
- /** User account on the VM to run the runnables in the agentTaskSpec. If not set, the runnable will be run under root user. */
228
- userAccount?:
229
- AgentTaskUserAccount;
230
- }
231
- interface AgentTaskUserAccount {
232
- /** gid id an unique identifier of the POSIX account group corresponding to the user account. */
233
- gid?:
234
- string;
235
- /** uid is an unique identifier of the POSIX account corresponding to the user account. */
236
- uid?:
237
- string;
238
- }
239
- interface AgentTimingInfo {
240
- /** Agent startup time */
241
- agentStartupTime?:
242
- string;
243
- /** Boot timestamp of the VM OS */
244
- bootTime?:
245
- string;
246
- /** Startup time of the Batch VM script. */
247
- scriptStartupTime?:
248
- string;
249
- }
250
- interface AllocationPolicy {
251
- /** Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now. */
252
- instances?:
253
- InstancePolicyOrTemplate[];
254
- /**
255
- * Labels applied to all VM instances and other resources created by AllocationPolicy. Labels could be user provided or system generated. You can assign up to 64 labels. [Google
256
- * Compute Engine label restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) apply. Label names that start with "goog-" or "google-" are reserved.
257
- */
258
- labels?:
259
- { [P in string]: string };
260
- /** Location where compute resources should be allocated for the Job. */
261
- location?:
262
- LocationPolicy;
263
- /** The network policy. If you define an instance template in the InstancePolicyOrTemplate field, Batch will use the network settings in the instance template instead of this field. */
264
- network?:
265
- NetworkPolicy;
266
- /** The placement policy. */
267
- placement?:
268
- PlacementPolicy;
269
- /** Service account that VMs will run as. */
270
- serviceAccount?:
271
- ServiceAccount;
272
- }
273
- interface AttachedDisk {
274
- /**
275
- * Device name that the guest operating system will see. It is used by Runnable.volumes field to mount disks. So please specify the device_name if you want Batch to help mount the
276
- * disk, and it should match the device_name field in volumes.
277
- */
278
- deviceName?:
279
- string;
280
- /** Name of an existing PD. */
281
- existingDisk?:
282
- string;
283
- newDisk?:
284
- Disk;
285
- }
286
- interface Barrier {
287
- /** Barriers are identified by their index in runnable list. Names are not required, but if present should be an identifier. */
288
- name?:
289
- string;
290
- }
291
- // tslint:disable-next-line:no-empty-interface
292
- interface CancelOperationRequest {
293
- }
294
- // tslint:disable-next-line:no-empty-interface
295
- interface CloudLoggingOption {
296
- }
297
- interface ComputeResource {
298
- /** Extra boot disk size in MiB for each task. */
299
- bootDiskMib?:
300
- string;
301
- /**
302
- * The milliCPU count. `cpuMilli` defines the amount of CPU resources per task in milliCPU units. For example, `1000` corresponds to 1 vCPU per task. If undefined, the default value is
303
- * `2000`. If you also define the VM's machine type using the `machineType` in
304
- * [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) field or inside the `instanceTemplate` in the
305
- * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) field, make sure the CPU resources for both fields
306
- * are compatible with each other and with how many tasks you want to allow to run on the same VM at the same time. For example, if you specify the `n2-standard-2` machine type, which
307
- * has 2 vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or you are recommended to run two tasks on the same VM if you set `cpuMilli` to `1000` or less.
308
- */
309
- cpuMilli?:
310
- string;
311
- /**
312
- * Memory in MiB. `memoryMib` defines the amount of memory per task in MiB units. If undefined, the default value is `2000`. If you also define the VM's machine type using the
313
- * `machineType` in [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) field or inside the `instanceTemplate` in the
314
- * [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) field, make sure the memory resources for both
315
- * fields are compatible with each other and with how many tasks you want to allow to run on the same VM at the same time. For example, if you specify the `n2-standard-2` machine type,
316
- * which has 8 GiB each, you are recommended to set `memoryMib` to no more than `8192`, or you are recommended to run two tasks on the same VM if you set `memoryMib` to `4096` or less.
317
- */
318
- memoryMib?:
319
- string;
320
- }
321
- interface Container {
322
- /**
323
- * If set to true, external network access to and from container will be blocked, containers that are with block_external_network as true can still communicate with each other, network
324
- * cannot be specified in the `container.options` field.
325
- */
326
- blockExternalNetwork?:
327
- boolean;
328
- /**
329
- * Overrides the `CMD` specified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments
330
- * to the ENTRYPOINT.
331
- */
332
- commands?:
333
- string[];
334
- /** Overrides the `ENTRYPOINT` specified in the container. */
335
- entrypoint?:
336
- string;
337
- /** The URI to pull the container image from. */
338
- imageUri?:
339
- string;
340
- /** Arbitrary additional options to include in the "docker run" command when running this container, e.g. "--network host". */
341
- options?:
342
- string;
343
- /** Optional password for logging in to a docker registry. If password matches `projects/*‍/secrets/*‍/versions/*` then Batch will read the password from the Secret Manager; */
344
- password?:
345
- string;
346
- /** Optional username for logging in to a docker registry. If username matches `projects/*‍/secrets/*‍/versions/*` then Batch will read the username from the Secret Manager. */
347
- username?:
348
- string;
349
- /**
350
- * Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro If the
351
- * `TaskSpec.Volumes` field is specified but this field is not, Batch will mount each volume from the host machine to the container with the same mount path by default. In this case,
352
- * the default mount option for containers will be read-only (ro) for existing persistent disks and read-write (rw) for other volume types, regardless of the original mount options
353
- * specified in `TaskSpec.Volumes`. If you need different mount settings, you can explicitly configure them in this field.
354
- */
355
- volumes?:
356
- string[];
357
- }
358
- interface Disk {
359
- /**
360
- * Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not indicated, "NVMe" will be the default one for local ssds. This field is ignored for persistent disks as
361
- * the interface is chosen automatically. See https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface.
362
- */
363
- diskInterface?:
364
- string;
365
- /**
366
- * URL for a VM image to use as the data source for this disk. For example, the following are all valid URLs: * Specify the image by its family name:
367
- * projects/{project}/global/images/family/{image_family} * Specify the image version: projects/{project}/global/images/{image_version} You can also use Batch customized image in short
368
- * names. The following image values are supported for a boot disk: * `batch-debian`: use Batch Debian images. * `batch-centos`: use Batch CentOS images. * `batch-cos`: use Batch
369
- * Container-Optimized images. * `batch-hpc-centos`: use Batch HPC CentOS images. * `batch-hpc-rocky`: use Batch HPC Rocky Linux images.
370
- */
371
- image?:
372
- string;
373
- /**
374
- * Disk size in GB. **Non-Boot Disk**: If the `type` specifies a persistent disk, this field is ignored if `data_source` is set as `image` or `snapshot`. If the `type` specifies a
375
- * local SSD, this field should be a multiple of 375 GB, otherwise, the final size will be the next greater multiple of 375 GB. **Boot Disk**: Batch will calculate the boot disk size
376
- * based on source image and task requirements if you do not speicify the size. If both this field and the `boot_disk_mib` field in task spec's `compute_resource` are defined, Batch
377
- * will only honor this field. Also, this field should be no smaller than the source disk's size when the `data_source` is set as `snapshot` or `image`. For example, if you set an
378
- * image as the `data_source` field and the image's default disk size 30 GB, you can only use this field to make the disk larger or equal to 30 GB.
379
- */
380
- sizeGb?:
381
- string;
382
- /** Name of a snapshot used as the data source. Snapshot is not supported as boot disk now. */
383
- snapshot?:
384
- string;
385
- /**
386
- * Disk type as shown in `gcloud compute disk-types list`. For example, local SSD uses type "local-ssd". Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" or
387
- * "pd-standard".
388
- */
389
- type?:
390
- string;
391
- }
392
- // tslint:disable-next-line:no-empty-interface
393
- interface Empty {
394
- }
395
- interface Environment {
396
- /** An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values. */
397
- encryptedVariables?:
398
- KMSEnvMap;
399
- /** A map of environment variable names to Secret Manager secret names. The VM will access the named secrets to set the value of each environment variable. */
400
- secretVariables?:
401
- { [P in string]: string };
402
- /** A map of environment variable names to values. */
403
- variables?:
404
- { [P in string]: string };
405
- }
406
- interface GCS {
407
- /** Remote path, either a bucket name or a subdirectory of a bucket, e.g.: bucket_name, bucket_name/subdirectory/ */
408
- remotePath?:
409
- string;
410
- }
411
- interface InstancePolicy {
412
- /** The accelerators attached to each VM instance. */
413
- accelerators?:
414
- Accelerator[];
415
- /** Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API now only supports booting from image. */
416
- bootDisk?:
417
- Disk;
418
- /**
419
- * Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. A non-boot disk is a disk that can be of a device with a
420
- * file system or a raw storage drive that is not ready for data storage and accessing.
421
- */
422
- disks?:
423
- AttachedDisk[];
424
- /** The Compute Engine machine type. */
425
- machineType?:
426
- string;
427
- /** The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. */
428
- minCpuPlatform?:
429
- string;
430
- /** The provisioning model. */
431
- provisioningModel?:
432
- string;
433
- /** Optional. If specified, VMs will consume only the specified reservation. If not specified (default), VMs will consume any applicable reservation. */
434
- reservation?:
435
- string;
436
- }
437
- interface InstancePolicyOrTemplate {
438
- /**
439
- * Set this field true if users want Batch to help fetch drivers from a third party location and install them for GPUs specified in policy.accelerators or instance_template on their
440
- * behalf. Default is false. For Container-Optimized Image cases, Batch will install the accelerator driver following milestones of
441
- * https://cloud.google.com/container-optimized-os/docs/release-notes. For non Container-Optimized Image cases, following
442
- * https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py.
443
- */
444
- installGpuDrivers?:
445
- boolean;
446
- /** Name of an instance template used to create VMs. Named the field as 'instance_template' instead of 'template' to avoid c++ keyword conflict. */
447
- instanceTemplate?:
448
- string;
449
- /** InstancePolicy. */
450
- policy?:
451
- InstancePolicy;
452
- }
453
- interface InstanceStatus {
454
- /** The VM boot disk. */
455
- bootDisk?:
456
- Disk;
457
- /** The Compute Engine machine type. */
458
- machineType?:
459
- string;
460
- /** The VM instance provisioning model. */
461
- provisioningModel?:
462
- string;
463
- /** The max number of tasks can be assigned to this instance type. */
464
- taskPack?:
465
- string;
466
- }
467
- interface Job {
468
- /** Compute resource allocation for all TaskGroups in the Job. */
469
- allocationPolicy?:
470
- AllocationPolicy;
471
- /** Output only. When the Job was created. */
472
- createTime?:
473
- string;
474
- /**
475
- * Labels for the Job. Labels could be user provided or system generated. For example, "labels": { "department": "finance", "environment": "test" } You can assign up to 64 labels.
476
- * [Google Compute Engine label restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) apply. Label names that start with "goog-" or "google-" are
477
- * reserved.
478
- */
479
- labels?:
480
- { [P in string]: string };
481
- /** Log preservation policy for the Job. */
482
- logsPolicy?:
483
- LogsPolicy;
484
- /** Output only. Job name. For example: "projects/123456/locations/us-central1/jobs/job01". */
485
- name?:
486
- string;
487
- /** Notification configurations. */
488
- notifications?:
489
- JobNotification[];
490
- /**
491
- * Priority of the Job. The valid value range is [0, 100). Default value is 0. Higher value indicates higher priority. A job with higher priority value is more likely to run earlier if
492
- * all other requirements are satisfied.
493
- */
494
- priority?:
495
- string;
496
- /** Output only. Job status. It is read only for users. */
497
- status?:
498
- JobStatus;
499
- /** Required. TaskGroups in the Job. Only one TaskGroup is supported now. */
500
- taskGroups?:
501
- TaskGroup[];
502
- /** Output only. A system generated unique ID (in UUID4 format) for the Job. */
503
- uid?:
504
- string;
505
- /** Output only. The last time the Job was updated. */
506
- updateTime?:
507
- string;
508
- }
509
- interface JobNotification {
510
- /** The attribute requirements of messages to be sent to this Pub/Sub topic. Without this field, no message will be sent. */
511
- message?:
512
- Message;
513
- /**
514
- * The Pub/Sub topic where notifications like the job state changes will be published. The topic must exist in the same project as the job and billings will be charged to this project.
515
- * If not specified, no Pub/Sub messages will be sent. Topic format: `projects/{project}/topics/{topic}`.
516
- */
517
- pubsubTopic?:
518
- string;
519
- }
520
- interface JobStatus {
521
- /** The duration of time that the Job spent in status RUNNING. */
522
- runDuration?:
523
- string;
524
- /** Job state */
525
- state?:
526
- string;
527
- /** Job status events */
528
- statusEvents?:
529
- StatusEvent[];
530
- /** Aggregated task status for each TaskGroup in the Job. The map key is TaskGroup ID. */
531
- taskGroups?:
532
- { [P in string]: TaskGroupStatus };
533
- }
534
- interface KMSEnvMap {
535
- /** The value of the cipherText response from the `encrypt` method. */
536
- cipherText?:
537
- string;
538
- /** The name of the KMS key that will be used to decrypt the cipher text. */
539
- keyName?:
540
- string;
541
- }
542
- interface LifecyclePolicy {
543
- /**
544
- * Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found.
545
- * Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found.
546
- */
547
- action?:
548
- string;
549
- /** Conditions that decide why a task failure is dealt with a specific action. */
550
- actionCondition?:
551
- ActionCondition;
552
- }
553
- interface ListJobsResponse {
554
- /** Jobs. */
555
- jobs?:
556
- Job[];
557
- /** Next page token. */
558
- nextPageToken?:
559
- string;
560
- /** Locations that could not be reached. */
561
- unreachable?:
562
- string[];
563
- }
564
- interface ListLocationsResponse {
565
- /** A list of locations that matches the specified filter in the request. */
566
- locations?:
567
- Location[];
568
- /** The standard List next-page token. */
569
- nextPageToken?:
570
- string;
571
- }
572
- interface ListOperationsResponse {
573
- /** The standard List next-page token. */
574
- nextPageToken?:
575
- string;
576
- /** A list of operations that matches the specified filter in the request. */
577
- operations?:
578
- Operation[];
579
- }
580
- interface ListTasksResponse {
581
- /** Next page token. */
582
- nextPageToken?:
583
- string;
584
- /** Tasks. */
585
- tasks?:
586
- Task[];
587
- /** Locations that could not be reached. */
588
- unreachable?:
589
- string[];
590
- }
591
- interface Location {
592
- /** The friendly name for this location, typically a nearby city name. For example, "Tokyo". */
593
- displayName?:
594
- string;
595
- /** Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} */
596
- labels?:
597
- { [P in string]: string };
598
- /** The canonical id for this location. For example: `"us-east1"`. */
599
- locationId?:
600
- string;
601
- /** Service-specific metadata. For example the available capacity at the given location. */
602
- metadata?:
603
- { [P in string]: any };
604
- /** Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` */
605
- name?:
606
- string;
607
- }
608
- interface LocationPolicy {
609
- /**
610
- * A list of allowed location names represented by internal URLs. Each location can be a region or a zone. Only one region or multiple zones in one region is supported now. For
611
- * example, ["regions/us-central1"] allow VMs in any zones in region us-central1. ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs in zones us-central1-a and
612
- * us-central1-c. All locations end up in different regions would cause errors. For example, ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", "zones/us-west1-a"]
613
- * contains 2 regions "us-central1" and "us-west1". An error is expected in this case.
614
- */
615
- allowedLocations?:
616
- string[];
617
- }
618
- interface LogsPolicy {
619
- /** Optional. Additional settings for Cloud Logging. It will only take effect when the destination of LogsPolicy is set to CLOUD_LOGGING. */
620
- cloudLoggingOption?:
621
- any;
622
- /** Where logs should be saved. */
623
- destination?:
624
- string;
625
- /**
626
- * The path to which logs are saved when the destination = PATH. This can be a local file path on the VM, or under the mount point of a Persistent Disk or Filestore, or a Cloud Storage
627
- * path.
628
- */
629
- logsPath?:
630
- string;
631
- }
632
- interface Message {
633
- /** The new job state. */
634
- newJobState?:
635
- string;
636
- /** The new task state. */
637
- newTaskState?:
638
- string;
639
- /** The message type. */
640
- type?:
641
- string;
642
- }
643
- interface NetworkInterface {
644
- /**
645
- * The URL of an existing network resource. You can specify the network as a full or partial URL. For example, the following are all valid URLs: *
646
- * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} * projects/{project}/global/networks/{network} * global/networks/{network}
647
- */
648
- network?:
649
- string;
650
- /**
651
- * Default is false (with an external IP address). Required if no external public IP address is attached to the VM. If no external public IP address, additional configuration is
652
- * required to allow the VM to access Google Services. See https://cloud.google.com/vpc/docs/configure-private-google-access and
653
- * https://cloud.google.com/nat/docs/gce-example#create-nat for more information.
654
- */
655
- noExternalIpAddress?:
656
- boolean;
657
- /**
658
- * The URL of an existing subnetwork resource in the network. You can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: *
659
- * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} * projects/{project}/regions/{region}/subnetworks/{subnetwork} *
660
- * regions/{region}/subnetworks/{subnetwork}
661
- */
662
- subnetwork?:
663
- string;
664
- }
665
- interface NetworkPolicy {
666
- /** Network configurations. */
667
- networkInterfaces?:
668
- NetworkInterface[];
669
- }
670
- interface NFS {
671
- /** Remote source path exported from the NFS, e.g., "/share". */
672
- remotePath?:
673
- string;
674
- /** The IP address of the NFS. */
675
- server?:
676
- string;
677
- }
678
- interface Operation {
679
- /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
680
- done?:
681
- boolean;
682
- /** The error result of the operation in case of failure or cancellation. */
683
- error?:
684
- Status;
685
- /**
686
- * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such
687
- * metadata. Any method that returns a long-running operation should document the metadata type, if any.
688
- */
689
- metadata?:
690
- { [P in string]: any };
691
- /**
692
- * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending
693
- * with `operations/{unique_id}`.
694
- */
695
- name?:
696
- string;
697
- /**
698
- * The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original
699
- * method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original
700
- * method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
701
- */
702
- response?:
703
- { [P in string]: any };
704
- }
705
- interface OperationMetadata {
706
- /** Output only. API version used to start the operation. */
707
- apiVersion?:
708
- string;
709
- /** Output only. The time the operation was created. */
710
- createTime?:
711
- string;
712
- /** Output only. The time the operation finished running. */
713
- endTime?:
714
- string;
715
- /**
716
- * Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a
717
- * google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
718
- */
719
- requestedCancellation?:
720
- boolean;
721
- /** Output only. Human-readable status of the operation, if any. */
722
- statusMessage?:
723
- string;
724
- /** Output only. Server-defined resource path for the target of the operation. */
725
- target?:
726
- string;
727
- /** Output only. Name of the verb executed by the operation. */
728
- verb?:
729
- string;
730
- }
731
- interface PlacementPolicy {
732
- /**
733
- * UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be located close to each other for low network latency between the VMs. No placement policy
734
- * will be generated when collocation is UNSPECIFIED.
735
- */
736
- collocation?:
737
- string;
738
- /**
739
- * When specified, causes the job to fail if more than max_distance logical switches are required between VMs. Batch uses the most compact possible placement of VMs even when
740
- * max_distance is not specified. An explicit max_distance makes that level of compactness a strict requirement. Not yet implemented
741
- */
742
- maxDistance?:
743
- string;
744
- }
745
- interface ReportAgentStateRequest {
746
- /** Agent info. */
747
- agentInfo?:
748
- AgentInfo;
749
- /** Agent timing info. */
750
- agentTimingInfo?:
751
- AgentTimingInfo;
752
- /** Agent metadata. */
753
- metadata?:
754
- AgentMetadata;
755
- }
756
- interface ReportAgentStateResponse {
757
- /** Default report interval override */
758
- defaultReportInterval?:
759
- string;
760
- /** Minimum report interval override */
761
- minReportInterval?:
762
- string;
763
- /** Tasks assigned to the agent */
764
- tasks?:
765
- AgentTask[];
766
- /** If true, the cloud logging for batch agent will use batch.googleapis.com/Job as monitored resource for Batch job related logging. */
767
- useBatchMonitoredResource?:
768
- boolean;
769
- }
770
- interface Runnable {
771
- /**
772
- * By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for
773
- * Runnables that copy output files off of the VM or for debugging. The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then
774
- * no further Runnables will execute, not even always_run Runnables.
775
- */
776
- alwaysRun?:
777
- boolean;
778
- /**
779
- * This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide
780
- * debugging support tools like SSH servers).
781
- */
782
- background?:
783
- boolean;
784
- /** Barrier runnable. */
785
- barrier?:
786
- Barrier;
787
- /** Container runnable. */
788
- container?:
789
- Container;
790
- /**
791
- * Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for
792
- * users to understand the logs. If not provided the index of the runnable will be used for outputs.
793
- */
794
- displayName?:
795
- string;
796
- /** Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup). */
797
- environment?:
798
- Environment;
799
- /** Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead. */
800
- ignoreExitStatus?:
801
- boolean;
802
- /** Labels for this Runnable. */
803
- labels?:
804
- { [P in string]: string };
805
- /** Script runnable. */
806
- script?:
807
- Script;
808
- /** Timeout for this Runnable. */
809
- timeout?:
810
- string;
811
- }
812
- interface Script {
813
- /**
814
- * Script file path on the host VM. To specify an interpreter, please add a `#!`(also known as [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the
815
- * file.(For example, to execute the script using bash, `#!/bin/bash` should be the first line of the file. To execute the script using`Python3`, `#!/usr/bin/env python3` should be the
816
- * first line of the file.) Otherwise, the file will by default be excuted by `/bin/sh`.
817
- */
818
- path?:
819
- string;
820
- /**
821
- * Shell script text. To specify an interpreter, please add a `#!\n` at the beginning of the text.(For example, to execute the script using bash, `#!/bin/bash\n` should be added. To
822
- * execute the script using`Python3`, `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by default be excuted by `/bin/sh`.
823
- */
824
- text?:
825
- string;
826
- }
827
- interface ServiceAccount {
828
- /**
829
- * Email address of the service account. If not specified, the default Compute Engine service account for the project will be used. If instance template is being used, the service
830
- * account has to be specified in the instance template and it has to match the email field here.
831
- */
832
- email?:
833
- string;
834
- /** List of scopes to be enabled for this service account on the VM, in addition to the cloud-platform API scope that will be added by default. */
835
- scopes?:
836
- string[];
837
- }
838
- interface Status {
839
- /** The status code, which should be an enum value of google.rpc.Code. */
840
- code?:
841
- number;
842
- /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
843
- details?:
844
- Array<{ [P in string]: any }>;
845
- /**
846
- * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the
847
- * client.
848
- */
849
- message?:
850
- string;
851
- }
852
- interface StatusEvent {
853
- /** Description of the event. */
854
- description?:
855
- string;
856
- /** The time this event occurred. */
857
- eventTime?:
858
- string;
859
- /** Task Execution */
860
- taskExecution?:
861
- TaskExecution;
862
- /** Task State */
863
- taskState?:
864
- string;
865
- /** Type of the event. */
866
- type?:
867
- string;
868
- }
869
- interface Task {
870
- /** Task name. The name is generated from the parent TaskGroup name and 'id' field. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". */
871
- name?:
872
- string;
873
- /** Task Status. */
874
- status?:
875
- TaskStatus;
876
- }
877
- interface TaskExecution {
878
- /** When task is completed as the status of FAILED or SUCCEEDED, exit code is for one task execution result, default is 0 as success. */
879
- exitCode?:
880
- number;
881
- }
882
- interface TaskGroup {
883
- /** Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". */
884
- name?:
885
- string;
886
- /**
887
- * Max number of tasks that can run in parallel. Default to min(task_count, parallel tasks per job limit). See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). Field
888
- * parallelism must be 1 if the scheduling_policy is IN_ORDER.
889
- */
890
- parallelism?:
891
- string;
892
- /** When true, Batch will configure SSH to allow passwordless login between VMs running the Batch tasks in the same TaskGroup. */
893
- permissiveSsh?:
894
- boolean;
895
- /** When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false. */
896
- requireHostsFile?:
897
- boolean;
898
- /** Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE. */
899
- schedulingPolicy?:
900
- string;
901
- /** Number of Tasks in the TaskGroup. Default is 1. */
902
- taskCount?:
903
- string;
904
- /** Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements. */
905
- taskCountPerNode?:
906
- string;
907
- /**
908
- * An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and
909
- * will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment
910
- * variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).
911
- */
912
- taskEnvironments?:
913
- Environment[];
914
- /** Required. Tasks in the group share the same task spec. */
915
- taskSpec?:
916
- TaskSpec;
917
- }
918
- interface TaskGroupStatus {
919
- /** Count of task in each state in the TaskGroup. The map key is task state name. */
920
- counts?:
921
- { [P in string]: string };
922
- /** Status of instances allocated for the TaskGroup. */
923
- instances?:
924
- InstanceStatus[];
925
- }
926
- interface TaskSpec {
927
- /** ComputeResource requirements. */
928
- computeResource?:
929
- ComputeResource;
930
- /** Environment variables to set before running the Task. */
931
- environment?:
932
- Environment;
933
- /** Deprecated: please use environment(non-plural) instead. */
934
- environments?:
935
- { [P in string]: string };
936
- /**
937
- * Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the
938
- * policy will execute. If task execution result does not meet with the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit
939
- * task. If task ends with non-zero exit code, retry the task with max_retry_count.
940
- */
941
- lifecyclePolicies?:
942
- LifecyclePolicy[];
943
- /** Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10]. */
944
- maxRetryCount?:
945
- number;
946
- /** Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit. */
947
- maxRunDuration?:
948
- string;
949
- /**
950
- * The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either
951
- * exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a
952
- * short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not
953
- * treated as Task failures.
954
- */
955
- runnables?:
956
- Runnable[];
957
- /** Volumes to mount before running Tasks using this TaskSpec. */
958
- volumes?:
959
- Volume[];
960
- }
961
- interface TaskStatus {
962
- /** Task state */
963
- state?:
964
- string;
965
- /** Detailed info about why the state is reached. */
966
- statusEvents?:
967
- StatusEvent[];
968
- }
969
- interface Volume {
970
- /**
971
- * Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given
972
- * instance template in job.allocation_policy.instances[0].instance_template.
973
- */
974
- deviceName?:
975
- string;
976
- /** A Google Cloud Storage (GCS) volume. */
977
- gcs?:
978
- GCS;
979
- /**
980
- * For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). For existing persistent disks, mount
981
- * options provided by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode
982
- * (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount
983
- * command (https://man7.org/linux/man-pages/man8/mount.8.html).
984
- */
985
- mountOptions?:
986
- string[];
987
- /** The mount path for the volume, e.g. /mnt/disks/share. */
988
- mountPath?:
989
- string;
990
- /** A Network File System (NFS) volume. For example, a Filestore file share. */
991
- nfs?:
992
- NFS;
993
- }
994
- interface TasksResource {
995
- /** Return a single Task. */
996
- get(request?: {
997
- /** V1 error format. */
998
- "$.xgafv"?:
999
- string;
1000
- /** OAuth access token. */
1001
- access_token?:
1002
- string;
1003
- /** Data format for response. */
1004
- alt?:
1005
- string;
1006
- /** JSONP */
1007
- callback?:
1008
- string;
1009
- /** Selector specifying which fields to include in a partial response. */
1010
- fields?:
1011
- string;
1012
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1013
- key?:
1014
- string;
1015
- /** Required. Task name. */
1016
- name:
1017
- string;
1018
- /** OAuth 2.0 token for the current user. */
1019
- oauth_token?:
1020
- string;
1021
- /** Returns response with indentations and line breaks. */
1022
- prettyPrint?:
1023
- boolean;
1024
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1025
- quotaUser?:
1026
- string;
1027
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1028
- upload_protocol?:
1029
- string;
1030
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1031
- uploadType?:
1032
- string;
1033
- }): Request<Task>;
1034
- /** List Tasks associated with a job. */
1035
- list(request?: {
1036
- /** V1 error format. */
1037
- "$.xgafv"?:
1038
- string;
1039
- /** OAuth access token. */
1040
- access_token?:
1041
- string;
1042
- /** Data format for response. */
1043
- alt?:
1044
- string;
1045
- /** JSONP */
1046
- callback?:
1047
- string;
1048
- /** Selector specifying which fields to include in a partial response. */
1049
- fields?:
1050
- string;
1051
- /** Task filter, null filter matches all Tasks. Filter string should be of the format State=TaskStatus.State e.g. State=RUNNING */
1052
- filter?:
1053
- string;
1054
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1055
- key?:
1056
- string;
1057
- /** OAuth 2.0 token for the current user. */
1058
- oauth_token?:
1059
- string;
1060
- /** Page size. */
1061
- pageSize?:
1062
- number;
1063
- /** Page token. */
1064
- pageToken?:
1065
- string;
1066
- /** Required. Name of a TaskGroup from which Tasks are being requested. Pattern: "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" */
1067
- parent:
1068
- string;
1069
- /** Returns response with indentations and line breaks. */
1070
- prettyPrint?:
1071
- boolean;
1072
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1073
- quotaUser?:
1074
- string;
1075
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1076
- upload_protocol?:
1077
- string;
1078
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1079
- uploadType?:
1080
- string;
1081
- }): Request<ListTasksResponse>;
1082
- }
1083
- interface TaskGroupsResource {
1084
- tasks:
1085
- TasksResource;
1086
- }
1087
- interface JobsResource {
1088
- /** Create a Job. */
1089
- create(request: {
1090
- /** V1 error format. */
1091
- "$.xgafv"?:
1092
- string;
1093
- /** OAuth access token. */
1094
- access_token?:
1095
- string;
1096
- /** Data format for response. */
1097
- alt?:
1098
- string;
1099
- /** JSONP */
1100
- callback?:
1101
- string;
1102
- /** Selector specifying which fields to include in a partial response. */
1103
- fields?:
1104
- string;
1105
- /**
1106
- * ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase
1107
- * characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set. The job.name field
1108
- * in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}".
1109
- */
1110
- jobId?:
1111
- string;
1112
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1113
- key?:
1114
- string;
1115
- /** OAuth 2.0 token for the current user. */
1116
- oauth_token?:
1117
- string;
1118
- /** Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}" */
1119
- parent:
1120
- string;
1121
- /** Returns response with indentations and line breaks. */
1122
- prettyPrint?:
1123
- boolean;
1124
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1125
- quotaUser?:
1126
- string;
1127
- /**
1128
- * Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has
1129
- * already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and
1130
- * the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will
1131
- * ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not
1132
- * supported (00000000-0000-0000-0000-000000000000).
1133
- */
1134
- requestId?:
1135
- string;
1136
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1137
- upload_protocol?:
1138
- string;
1139
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1140
- uploadType?:
1141
- string;
1142
- /** Request body */
1143
- resource:
1144
- Job;
1145
- }): Request<Job>;
1146
- create(request: {
1147
- /** V1 error format. */
1148
- "$.xgafv"?:
1149
- string;
1150
- /** OAuth access token. */
1151
- access_token?:
1152
- string;
1153
- /** Data format for response. */
1154
- alt?:
1155
- string;
1156
- /** JSONP */
1157
- callback?:
1158
- string;
1159
- /** Selector specifying which fields to include in a partial response. */
1160
- fields?:
1161
- string;
1162
- /**
1163
- * ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase
1164
- * characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set. The job.name field
1165
- * in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}".
1166
- */
1167
- jobId?:
1168
- string;
1169
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1170
- key?:
1171
- string;
1172
- /** OAuth 2.0 token for the current user. */
1173
- oauth_token?:
1174
- string;
1175
- /** Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}" */
1176
- parent:
1177
- string;
1178
- /** Returns response with indentations and line breaks. */
1179
- prettyPrint?:
1180
- boolean;
1181
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1182
- quotaUser?:
1183
- string;
1184
- /**
1185
- * Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has
1186
- * already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and
1187
- * the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will
1188
- * ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not
1189
- * supported (00000000-0000-0000-0000-000000000000).
1190
- */
1191
- requestId?:
1192
- string;
1193
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1194
- upload_protocol?:
1195
- string;
1196
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1197
- uploadType?:
1198
- string;
1199
- },
1200
- body: Job): Request<Job>;
1201
- /** Delete a Job. */
1202
- delete(request?: {
1203
- /** V1 error format. */
1204
- "$.xgafv"?:
1205
- string;
1206
- /** OAuth access token. */
1207
- access_token?:
1208
- string;
1209
- /** Data format for response. */
1210
- alt?:
1211
- string;
1212
- /** JSONP */
1213
- callback?:
1214
- string;
1215
- /** Selector specifying which fields to include in a partial response. */
1216
- fields?:
1217
- string;
1218
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1219
- key?:
1220
- string;
1221
- /** Job name. */
1222
- name:
1223
- string;
1224
- /** OAuth 2.0 token for the current user. */
1225
- oauth_token?:
1226
- string;
1227
- /** Returns response with indentations and line breaks. */
1228
- prettyPrint?:
1229
- boolean;
1230
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1231
- quotaUser?:
1232
- string;
1233
- /** Optional. Reason for this deletion. */
1234
- reason?:
1235
- string;
1236
- /**
1237
- * Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has
1238
- * already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and
1239
- * the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will
1240
- * ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not
1241
- * supported (00000000-0000-0000-0000-000000000000).
1242
- */
1243
- requestId?:
1244
- string;
1245
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1246
- upload_protocol?:
1247
- string;
1248
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1249
- uploadType?:
1250
- string;
1251
- }): Request<Operation>;
1252
- /** Get a Job specified by its resource name. */
1253
- get(request?: {
1254
- /** V1 error format. */
1255
- "$.xgafv"?:
1256
- string;
1257
- /** OAuth access token. */
1258
- access_token?:
1259
- string;
1260
- /** Data format for response. */
1261
- alt?:
1262
- string;
1263
- /** JSONP */
1264
- callback?:
1265
- string;
1266
- /** Selector specifying which fields to include in a partial response. */
1267
- fields?:
1268
- string;
1269
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1270
- key?:
1271
- string;
1272
- /** Required. Job name. */
1273
- name:
1274
- string;
1275
- /** OAuth 2.0 token for the current user. */
1276
- oauth_token?:
1277
- string;
1278
- /** Returns response with indentations and line breaks. */
1279
- prettyPrint?:
1280
- boolean;
1281
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1282
- quotaUser?:
1283
- string;
1284
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1285
- upload_protocol?:
1286
- string;
1287
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1288
- uploadType?:
1289
- string;
1290
- }): Request<Job>;
1291
- /** List all Jobs for a project within a region. */
1292
- list(request?: {
1293
- /** V1 error format. */
1294
- "$.xgafv"?:
1295
- string;
1296
- /** OAuth access token. */
1297
- access_token?:
1298
- string;
1299
- /** Data format for response. */
1300
- alt?:
1301
- string;
1302
- /** JSONP */
1303
- callback?:
1304
- string;
1305
- /** Selector specifying which fields to include in a partial response. */
1306
- fields?:
1307
- string;
1308
- /** List filter. */
1309
- filter?:
1310
- string;
1311
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1312
- key?:
1313
- string;
1314
- /** OAuth 2.0 token for the current user. */
1315
- oauth_token?:
1316
- string;
1317
- /** Optional. Sort results. Supported are "name", "name desc", "create_time", and "create_time desc". */
1318
- orderBy?:
1319
- string;
1320
- /** Page size. */
1321
- pageSize?:
1322
- number;
1323
- /** Page token. */
1324
- pageToken?:
1325
- string;
1326
- /** Parent path. */
1327
- parent:
1328
- string;
1329
- /** Returns response with indentations and line breaks. */
1330
- prettyPrint?:
1331
- boolean;
1332
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1333
- quotaUser?:
1334
- string;
1335
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1336
- upload_protocol?:
1337
- string;
1338
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1339
- uploadType?:
1340
- string;
1341
- }): Request<ListJobsResponse>;
1342
- taskGroups:
1343
- TaskGroupsResource;
1344
- }
1345
- interface OperationsResource {
1346
- /**
1347
- * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support
1348
- * this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the
1349
- * operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a
1350
- * google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
1351
- */
1352
- cancel(request: {
1353
- /** V1 error format. */
1354
- "$.xgafv"?:
1355
- string;
1356
- /** OAuth access token. */
1357
- access_token?:
1358
- string;
1359
- /** Data format for response. */
1360
- alt?:
1361
- string;
1362
- /** JSONP */
1363
- callback?:
1364
- string;
1365
- /** Selector specifying which fields to include in a partial response. */
1366
- fields?:
1367
- string;
1368
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1369
- key?:
1370
- string;
1371
- /** The name of the operation resource to be cancelled. */
1372
- name:
1373
- string;
1374
- /** OAuth 2.0 token for the current user. */
1375
- oauth_token?:
1376
- string;
1377
- /** Returns response with indentations and line breaks. */
1378
- prettyPrint?:
1379
- boolean;
1380
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1381
- quotaUser?:
1382
- string;
1383
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1384
- upload_protocol?:
1385
- string;
1386
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1387
- uploadType?:
1388
- string;
1389
- /** Request body */
1390
- resource:
1391
- CancelOperationRequest;
1392
- }): Request<{}>;
1393
- cancel(request: {
1394
- /** V1 error format. */
1395
- "$.xgafv"?:
1396
- string;
1397
- /** OAuth access token. */
1398
- access_token?:
1399
- string;
1400
- /** Data format for response. */
1401
- alt?:
1402
- string;
1403
- /** JSONP */
1404
- callback?:
1405
- string;
1406
- /** Selector specifying which fields to include in a partial response. */
1407
- fields?:
1408
- string;
1409
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1410
- key?:
1411
- string;
1412
- /** The name of the operation resource to be cancelled. */
1413
- name:
1414
- string;
1415
- /** OAuth 2.0 token for the current user. */
1416
- oauth_token?:
1417
- string;
1418
- /** Returns response with indentations and line breaks. */
1419
- prettyPrint?:
1420
- boolean;
1421
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1422
- quotaUser?:
1423
- string;
1424
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1425
- upload_protocol?:
1426
- string;
1427
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1428
- uploadType?:
1429
- string;
1430
- },
1431
- body: CancelOperationRequest): Request<{}>;
1432
- /**
1433
- * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't
1434
- * support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1435
- */
1436
- delete(request?: {
1437
- /** V1 error format. */
1438
- "$.xgafv"?:
1439
- string;
1440
- /** OAuth access token. */
1441
- access_token?:
1442
- string;
1443
- /** Data format for response. */
1444
- alt?:
1445
- string;
1446
- /** JSONP */
1447
- callback?:
1448
- string;
1449
- /** Selector specifying which fields to include in a partial response. */
1450
- fields?:
1451
- string;
1452
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1453
- key?:
1454
- string;
1455
- /** The name of the operation resource to be deleted. */
1456
- name:
1457
- string;
1458
- /** OAuth 2.0 token for the current user. */
1459
- oauth_token?:
1460
- string;
1461
- /** Returns response with indentations and line breaks. */
1462
- prettyPrint?:
1463
- boolean;
1464
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1465
- quotaUser?:
1466
- string;
1467
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1468
- upload_protocol?:
1469
- string;
1470
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1471
- uploadType?:
1472
- string;
1473
- }): Request<{}>;
1474
- /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
1475
- get(request?: {
1476
- /** V1 error format. */
1477
- "$.xgafv"?:
1478
- string;
1479
- /** OAuth access token. */
1480
- access_token?:
1481
- string;
1482
- /** Data format for response. */
1483
- alt?:
1484
- string;
1485
- /** JSONP */
1486
- callback?:
1487
- string;
1488
- /** Selector specifying which fields to include in a partial response. */
1489
- fields?:
1490
- string;
1491
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1492
- key?:
1493
- string;
1494
- /** The name of the operation resource. */
1495
- name:
1496
- string;
1497
- /** OAuth 2.0 token for the current user. */
1498
- oauth_token?:
1499
- string;
1500
- /** Returns response with indentations and line breaks. */
1501
- prettyPrint?:
1502
- boolean;
1503
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1504
- quotaUser?:
1505
- string;
1506
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1507
- upload_protocol?:
1508
- string;
1509
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1510
- uploadType?:
1511
- string;
1512
- }): Request<Operation>;
1513
- /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
1514
- list(request?: {
1515
- /** V1 error format. */
1516
- "$.xgafv"?:
1517
- string;
1518
- /** OAuth access token. */
1519
- access_token?:
1520
- string;
1521
- /** Data format for response. */
1522
- alt?:
1523
- string;
1524
- /** JSONP */
1525
- callback?:
1526
- string;
1527
- /** Selector specifying which fields to include in a partial response. */
1528
- fields?:
1529
- string;
1530
- /** The standard list filter. */
1531
- filter?:
1532
- string;
1533
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1534
- key?:
1535
- string;
1536
- /** The name of the operation's parent resource. */
1537
- name:
1538
- string;
1539
- /** OAuth 2.0 token for the current user. */
1540
- oauth_token?:
1541
- string;
1542
- /** The standard list page size. */
1543
- pageSize?:
1544
- number;
1545
- /** The standard list page token. */
1546
- pageToken?:
1547
- string;
1548
- /** Returns response with indentations and line breaks. */
1549
- prettyPrint?:
1550
- boolean;
1551
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1552
- quotaUser?:
1553
- string;
1554
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1555
- upload_protocol?:
1556
- string;
1557
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1558
- uploadType?:
1559
- string;
1560
- }): Request<ListOperationsResponse>;
1561
- }
1562
- interface StateResource {
1563
- /** Report agent's state, e.g. agent status and tasks information */
1564
- report(request: {
1565
- /** V1 error format. */
1566
- "$.xgafv"?:
1567
- string;
1568
- /** OAuth access token. */
1569
- access_token?:
1570
- string;
1571
- /** Data format for response. */
1572
- alt?:
1573
- string;
1574
- /** JSONP */
1575
- callback?:
1576
- string;
1577
- /** Selector specifying which fields to include in a partial response. */
1578
- fields?:
1579
- string;
1580
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1581
- key?:
1582
- string;
1583
- /** OAuth 2.0 token for the current user. */
1584
- oauth_token?:
1585
- string;
1586
- /** Required. Format: projects/{project}/locations/{location} {project} should be a project number. */
1587
- parent:
1588
- string;
1589
- /** Returns response with indentations and line breaks. */
1590
- prettyPrint?:
1591
- boolean;
1592
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1593
- quotaUser?:
1594
- string;
1595
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1596
- upload_protocol?:
1597
- string;
1598
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1599
- uploadType?:
1600
- string;
1601
- /** Request body */
1602
- resource:
1603
- ReportAgentStateRequest;
1604
- }): Request<ReportAgentStateResponse>;
1605
- report(request: {
1606
- /** V1 error format. */
1607
- "$.xgafv"?:
1608
- string;
1609
- /** OAuth access token. */
1610
- access_token?:
1611
- string;
1612
- /** Data format for response. */
1613
- alt?:
1614
- string;
1615
- /** JSONP */
1616
- callback?:
1617
- string;
1618
- /** Selector specifying which fields to include in a partial response. */
1619
- fields?:
1620
- string;
1621
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1622
- key?:
1623
- string;
1624
- /** OAuth 2.0 token for the current user. */
1625
- oauth_token?:
1626
- string;
1627
- /** Required. Format: projects/{project}/locations/{location} {project} should be a project number. */
1628
- parent:
1629
- string;
1630
- /** Returns response with indentations and line breaks. */
1631
- prettyPrint?:
1632
- boolean;
1633
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1634
- quotaUser?:
1635
- string;
1636
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1637
- upload_protocol?:
1638
- string;
1639
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1640
- uploadType?:
1641
- string;
1642
- },
1643
- body: ReportAgentStateRequest): Request<ReportAgentStateResponse>;
1644
- }
1645
- interface LocationsResource {
1646
- /** Gets information about a location. */
1647
- get(request?: {
1648
- /** V1 error format. */
1649
- "$.xgafv"?:
1650
- string;
1651
- /** OAuth access token. */
1652
- access_token?:
1653
- string;
1654
- /** Data format for response. */
1655
- alt?:
1656
- string;
1657
- /** JSONP */
1658
- callback?:
1659
- string;
1660
- /** Selector specifying which fields to include in a partial response. */
1661
- fields?:
1662
- string;
1663
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1664
- key?:
1665
- string;
1666
- /** Resource name for the location. */
1667
- name:
1668
- string;
1669
- /** OAuth 2.0 token for the current user. */
1670
- oauth_token?:
1671
- string;
1672
- /** Returns response with indentations and line breaks. */
1673
- prettyPrint?:
1674
- boolean;
1675
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1676
- quotaUser?:
1677
- string;
1678
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1679
- upload_protocol?:
1680
- string;
1681
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1682
- uploadType?:
1683
- string;
1684
- }): Request<Location>;
1685
- /** Lists information about the supported locations for this service. */
1686
- list(request?: {
1687
- /** V1 error format. */
1688
- "$.xgafv"?:
1689
- string;
1690
- /** OAuth access token. */
1691
- access_token?:
1692
- string;
1693
- /** Data format for response. */
1694
- alt?:
1695
- string;
1696
- /** JSONP */
1697
- callback?:
1698
- string;
1699
- /** Selector specifying which fields to include in a partial response. */
1700
- fields?:
1701
- string;
1702
- /**
1703
- * A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in
1704
- * [AIP-160](https://google.aip.dev/160).
1705
- */
1706
- filter?:
1707
- string;
1708
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1709
- key?:
1710
- string;
1711
- /** The resource that owns the locations collection, if applicable. */
1712
- name:
1713
- string;
1714
- /** OAuth 2.0 token for the current user. */
1715
- oauth_token?:
1716
- string;
1717
- /** The maximum number of results to return. If not set, the service selects a default. */
1718
- pageSize?:
1719
- number;
1720
- /** A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */
1721
- pageToken?:
1722
- string;
1723
- /** Returns response with indentations and line breaks. */
1724
- prettyPrint?:
1725
- boolean;
1726
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1727
- quotaUser?:
1728
- string;
1729
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1730
- upload_protocol?:
1731
- string;
1732
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1733
- uploadType?:
1734
- string;
1735
- }): Request<ListLocationsResponse>;
1736
- jobs:
1737
- JobsResource;
1738
- operations:
1739
- OperationsResource;
1740
- state:
1741
- StateResource;
1742
- }
1743
- interface ProjectsResource {
1744
- locations:
1745
- LocationsResource;
1746
- }
1747
-
1748
- const projects: ProjectsResource;
26
+ namespace batch {
27
+ interface Accelerator {
28
+ /** The number of accelerators of this type. */
29
+ count?: string;
30
+ /** Optional. The NVIDIA GPU driver version that should be installed for this type. You can define the specific driver version such as "470.103.01", following the driver version requirements in https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. Batch will install the specific accelerator driver if qualified. */
31
+ driverVersion?: string;
32
+ /** Deprecated: please use instances[0].install_gpu_drivers instead. */
33
+ installGpuDrivers?: boolean;
34
+ /** The accelerator type. For example, "nvidia-tesla-t4". See `gcloud compute accelerator-types list`. */
35
+ type?: string;
36
+ }
37
+ interface ActionCondition {
38
+ /** Exit codes of a task execution. If there are more than 1 exit codes, when task executes with any of the exit code in the list, the condition is met and the action will be executed. */
39
+ exitCodes?: number[];
40
+ }
41
+ interface AgentContainer {
42
+ /** Overrides the `CMD` specified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments to the ENTRYPOINT. */
43
+ commands?: string[];
44
+ /** Overrides the `ENTRYPOINT` specified in the container. */
45
+ entrypoint?: string;
46
+ /** The URI to pull the container image from. */
47
+ imageUri?: string;
48
+ /** Arbitrary additional options to include in the "docker run" command when running this container, e.g. "--network host". */
49
+ options?: string;
50
+ /** Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro */
51
+ volumes?: string[];
52
+ }
53
+ interface AgentEnvironment {
54
+ /** An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values. */
55
+ encryptedVariables?: AgentKMSEnvMap;
56
+ /** A map of environment variable names to Secret Manager secret names. The VM will access the named secrets to set the value of each environment variable. */
57
+ secretVariables?: {[P in string]: string};
58
+ /** A map of environment variable names to values. */
59
+ variables?: {[P in string]: string};
60
+ }
61
+ interface AgentInfo {
62
+ /** Optional. The assigned Job ID */
63
+ jobId?: string;
64
+ /** When the AgentInfo is generated. */
65
+ reportTime?: string;
66
+ /** Agent state. */
67
+ state?: string;
68
+ /** The assigned task group ID. */
69
+ taskGroupId?: string;
70
+ /** Task Info. */
71
+ tasks?: AgentTaskInfo[];
72
+ }
73
+ interface AgentKMSEnvMap {
74
+ /** The value of the cipherText response from the `encrypt` method. */
75
+ cipherText?: string;
76
+ /** The name of the KMS key that will be used to decrypt the cipher text. */
77
+ keyName?: string;
78
+ }
79
+ interface AgentMetadata {
80
+ /** When the VM agent started. Use agent_startup_time instead. */
81
+ creationTime?: string;
82
+ /** Full name of the entity that created this vm. For MIG, this path is: projects/{project}/regions/{region}/InstanceGroupManagers/{igm} The value is retrieved from the vm metadata key of "created-by". */
83
+ creator?: string;
84
+ /** image version for the VM that this agent is installed on. */
85
+ imageVersion?: string;
86
+ /** GCP instance name (go/instance-name). */
87
+ instance?: string;
88
+ /** GCP instance ID (go/instance-id). */
89
+ instanceId?: string;
90
+ /** If the GCP instance has received preemption notice. */
91
+ instancePreemptionNoticeReceived?: boolean;
92
+ /** parsed contents of /etc/os-release */
93
+ osRelease?: {[P in string]: string};
94
+ /** agent binary version running on VM */
95
+ version?: string;
96
+ /** Agent zone. */
97
+ zone?: string;
98
+ }
99
+ interface AgentScript {
100
+ /** Script file path on the host VM. To specify an interpreter, please add a `#!`(also known as [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the file.(For example, to execute the script using bash, `#!/bin/bash` should be the first line of the file. To execute the script using`Python3`, `#!/usr/bin/env python3` should be the first line of the file.) Otherwise, the file will by default be excuted by `/bin/sh`. */
101
+ path?: string;
102
+ /** Shell script text. To specify an interpreter, please add a `#!\n` at the beginning of the text.(For example, to execute the script using bash, `#!/bin/bash\n` should be added. To execute the script using`Python3`, `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by default be excuted by `/bin/sh`. */
103
+ text?: string;
104
+ }
105
+ interface AgentTask {
106
+ /** AgentTaskSpec is the taskSpec representation between Agent and CLH communication. This field will replace the TaskSpec field above in future to have a better separation between user-facaing API and internal API. */
107
+ agentTaskSpec?: AgentTaskSpec;
108
+ /** The intended state of the task. */
109
+ intendedState?: string;
110
+ /** The highest barrier reached by all tasks in the task's TaskGroup. */
111
+ reachedBarrier?: string;
112
+ /** Task Spec. This field will be replaced by agent_task_spec below in future. */
113
+ spec?: TaskSpec;
114
+ /** Task status. */
115
+ status?: TaskStatus;
116
+ /** Task name. */
117
+ task?: string;
118
+ /** TaskSource represents the source of the task. */
119
+ taskSource?: string;
120
+ }
121
+ interface AgentTaskInfo {
122
+ /** The highest index of a runnable started by the agent for this task. The runnables are indexed from 1. Value 0 is undefined. */
123
+ runnable?: string;
124
+ /** ID of the Task */
125
+ taskId?: string;
126
+ /** The status of the Task. If we need agent specific fields we should fork the public TaskStatus into an agent specific one. Or add them below. */
127
+ taskStatus?: TaskStatus;
128
+ }
129
+ interface AgentTaskRunnable {
130
+ /** By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for Runnables that copy output files off of the VM or for debugging. The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables. */
131
+ alwaysRun?: boolean;
132
+ /** This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide debugging support tools like SSH servers). */
133
+ background?: boolean;
134
+ /** Container runnable. */
135
+ container?: AgentContainer;
136
+ /** Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup). */
137
+ environment?: AgentEnvironment;
138
+ /** Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead. */
139
+ ignoreExitStatus?: boolean;
140
+ /** Script runnable. */
141
+ script?: AgentScript;
142
+ /** Timeout for this Runnable. */
143
+ timeout?: string;
144
+ }
145
+ interface AgentTaskSpec {
146
+ /** Environment variables to set before running the Task. */
147
+ environment?: AgentEnvironment;
148
+ /** Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit. */
149
+ maxRunDuration?: string;
150
+ /** AgentTaskRunnable is runanbles that will be executed on the agent. */
151
+ runnables?: AgentTaskRunnable[];
152
+ /** User account on the VM to run the runnables in the agentTaskSpec. If not set, the runnable will be run under root user. */
153
+ userAccount?: AgentTaskUserAccount;
154
+ }
155
+ interface AgentTaskUserAccount {
156
+ /** gid id an unique identifier of the POSIX account group corresponding to the user account. */
157
+ gid?: string;
158
+ /** uid is an unique identifier of the POSIX account corresponding to the user account. */
159
+ uid?: string;
160
+ }
161
+ interface AgentTimingInfo {
162
+ /** Agent startup time */
163
+ agentStartupTime?: string;
164
+ /** Boot timestamp of the VM OS */
165
+ bootTime?: string;
166
+ /** Startup time of the Batch VM script. */
167
+ scriptStartupTime?: string;
168
+ }
169
+ interface AllocationPolicy {
170
+ /** Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now. */
171
+ instances?: InstancePolicyOrTemplate[];
172
+ /** Labels applied to all VM instances and other resources created by AllocationPolicy. Labels could be user provided or system generated. You can assign up to 64 labels. [Google Compute Engine label restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) apply. Label names that start with "goog-" or "google-" are reserved. */
173
+ labels?: {[P in string]: string};
174
+ /** Location where compute resources should be allocated for the Job. */
175
+ location?: LocationPolicy;
176
+ /** The network policy. If you define an instance template in the InstancePolicyOrTemplate field, Batch will use the network settings in the instance template instead of this field. */
177
+ network?: NetworkPolicy;
178
+ /** The placement policy. */
179
+ placement?: PlacementPolicy;
180
+ /** Service account that VMs will run as. */
181
+ serviceAccount?: ServiceAccount;
182
+ }
183
+ interface AttachedDisk {
184
+ /** Device name that the guest operating system will see. It is used by Runnable.volumes field to mount disks. So please specify the device_name if you want Batch to help mount the disk, and it should match the device_name field in volumes. */
185
+ deviceName?: string;
186
+ /** Name of an existing PD. */
187
+ existingDisk?: string;
188
+ newDisk?: Disk;
189
+ }
190
+ interface Barrier {
191
+ /** Barriers are identified by their index in runnable list. Names are not required, but if present should be an identifier. */
192
+ name?: string;
193
+ }
194
+ interface CancelOperationRequest {}
195
+ interface ComputeResource {
196
+ /** Extra boot disk size in MiB for each task. */
197
+ bootDiskMib?: string;
198
+ /** The milliCPU count. `cpuMilli` defines the amount of CPU resources per task in milliCPU units. For example, `1000` corresponds to 1 vCPU per task. If undefined, the default value is `2000`. If you also define the VM's machine type using the `machineType` in [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) field or inside the `instanceTemplate` in the [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) field, make sure the CPU resources for both fields are compatible with each other and with how many tasks you want to allow to run on the same VM at the same time. For example, if you specify the `n2-standard-2` machine type, which has 2 vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or you are recommended to run two tasks on the same VM if you set `cpuMilli` to `1000` or less. */
199
+ cpuMilli?: string;
200
+ /** Memory in MiB. `memoryMib` defines the amount of memory per task in MiB units. If undefined, the default value is `2000`. If you also define the VM's machine type using the `machineType` in [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) field or inside the `instanceTemplate` in the [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) field, make sure the memory resources for both fields are compatible with each other and with how many tasks you want to allow to run on the same VM at the same time. For example, if you specify the `n2-standard-2` machine type, which has 8 GiB each, you are recommended to set `memoryMib` to no more than `8192`, or you are recommended to run two tasks on the same VM if you set `memoryMib` to `4096` or less. */
201
+ memoryMib?: string;
202
+ }
203
+ interface Container {
204
+ /** If set to true, external network access to and from container will be blocked, containers that are with block_external_network as true can still communicate with each other, network cannot be specified in the `container.options` field. */
205
+ blockExternalNetwork?: boolean;
206
+ /** Overrides the `CMD` specified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments to the ENTRYPOINT. */
207
+ commands?: string[];
208
+ /** Optional. If set to true, container will run with Image streaming. The container runtime will be changed to containerd instead of docker. Currently, only imageUri, commands, entrypoint and volumes are supported and any other fields will be ignored. Please refer [here](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming) for the feature requirements and limitations. */
209
+ enableImageStreaming?: boolean;
210
+ /** Overrides the `ENTRYPOINT` specified in the container. */
211
+ entrypoint?: string;
212
+ /** The URI to pull the container image from. */
213
+ imageUri?: string;
214
+ /** Arbitrary additional options to include in the "docker run" command when running this container, e.g. "--network host". */
215
+ options?: string;
216
+ /** Optional password for logging in to a docker registry. If password matches `projects/*‍/secrets/*‍/versions/*` then Batch will read the password from the Secret Manager; */
217
+ password?: string;
218
+ /** Optional username for logging in to a docker registry. If username matches `projects/*‍/secrets/*‍/versions/*` then Batch will read the username from the Secret Manager. */
219
+ username?: string;
220
+ /** Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro If the `TaskSpec.Volumes` field is specified but this field is not, Batch will mount each volume from the host machine to the container with the same mount path by default. In this case, the default mount option for containers will be read-only (ro) for existing persistent disks and read-write (rw) for other volume types, regardless of the original mount options specified in `TaskSpec.Volumes`. If you need different mount settings, you can explicitly configure them in this field. */
221
+ volumes?: string[];
222
+ }
223
+ interface Disk {
224
+ /** Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not indicated, "NVMe" will be the default one for local ssds. This field is ignored for persistent disks as the interface is chosen automatically. See https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. */
225
+ diskInterface?: string;
226
+ /** URL for a VM image to use as the data source for this disk. For example, the following are all valid URLs: * Specify the image by its family name: projects/{project}/global/images/family/{image_family} * Specify the image version: projects/{project}/global/images/{image_version} You can also use Batch customized image in short names. The following image values are supported for a boot disk: * `batch-debian`: use Batch Debian images. * `batch-centos`: use Batch CentOS images. * `batch-cos`: use Batch Container-Optimized images. * `batch-hpc-centos`: use Batch HPC CentOS images. * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. */
227
+ image?: string;
228
+ /** Disk size in GB. **Non-Boot Disk**: If the `type` specifies a persistent disk, this field is ignored if `data_source` is set as `image` or `snapshot`. If the `type` specifies a local SSD, this field should be a multiple of 375 GB, otherwise, the final size will be the next greater multiple of 375 GB. **Boot Disk**: Batch will calculate the boot disk size based on source image and task requirements if you do not speicify the size. If both this field and the `boot_disk_mib` field in task spec's `compute_resource` are defined, Batch will only honor this field. Also, this field should be no smaller than the source disk's size when the `data_source` is set as `snapshot` or `image`. For example, if you set an image as the `data_source` field and the image's default disk size 30 GB, you can only use this field to make the disk larger or equal to 30 GB. */
229
+ sizeGb?: string;
230
+ /** Name of a snapshot used as the data source. Snapshot is not supported as boot disk now. */
231
+ snapshot?: string;
232
+ /** Disk type as shown in `gcloud compute disk-types list`. For example, local SSD uses type "local-ssd". Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" or "pd-standard". */
233
+ type?: string;
234
+ }
235
+ interface Empty {}
236
+ interface Environment {
237
+ /** An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values. */
238
+ encryptedVariables?: KMSEnvMap;
239
+ /** A map of environment variable names to Secret Manager secret names. The VM will access the named secrets to set the value of each environment variable. */
240
+ secretVariables?: {[P in string]: string};
241
+ /** A map of environment variable names to values. */
242
+ variables?: {[P in string]: string};
243
+ }
244
+ interface GCS {
245
+ /** Remote path, either a bucket name or a subdirectory of a bucket, e.g.: bucket_name, bucket_name/subdirectory/ */
246
+ remotePath?: string;
247
+ }
248
+ interface InstancePolicy {
249
+ /** The accelerators attached to each VM instance. */
250
+ accelerators?: Accelerator[];
251
+ /** Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API now only supports booting from image. */
252
+ bootDisk?: Disk;
253
+ /** Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. A non-boot disk is a disk that can be of a device with a file system or a raw storage drive that is not ready for data storage and accessing. */
254
+ disks?: AttachedDisk[];
255
+ /** The Compute Engine machine type. */
256
+ machineType?: string;
257
+ /** The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. */
258
+ minCpuPlatform?: string;
259
+ /** The provisioning model. */
260
+ provisioningModel?: string;
261
+ /** Optional. If specified, VMs will consume only the specified reservation. If not specified (default), VMs will consume any applicable reservation. */
262
+ reservation?: string;
263
+ }
264
+ interface InstancePolicyOrTemplate {
265
+ /** Set this field true if users want Batch to help fetch drivers from a third party location and install them for GPUs specified in policy.accelerators or instance_template on their behalf. Default is false. For Container-Optimized Image cases, Batch will install the accelerator driver following milestones of https://cloud.google.com/container-optimized-os/docs/release-notes. For non Container-Optimized Image cases, following https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. */
266
+ installGpuDrivers?: boolean;
267
+ /** Name of an instance template used to create VMs. Named the field as 'instance_template' instead of 'template' to avoid c++ keyword conflict. */
268
+ instanceTemplate?: string;
269
+ /** InstancePolicy. */
270
+ policy?: InstancePolicy;
271
+ }
272
+ interface InstanceStatus {
273
+ /** The VM boot disk. */
274
+ bootDisk?: Disk;
275
+ /** The Compute Engine machine type. */
276
+ machineType?: string;
277
+ /** The VM instance provisioning model. */
278
+ provisioningModel?: string;
279
+ /** The max number of tasks can be assigned to this instance type. */
280
+ taskPack?: string;
281
+ }
282
+ interface Job {
283
+ /** Compute resource allocation for all TaskGroups in the Job. */
284
+ allocationPolicy?: AllocationPolicy;
285
+ /** Output only. When the Job was created. */
286
+ createTime?: string;
287
+ /** Labels for the Job. Labels could be user provided or system generated. For example, "labels": { "department": "finance", "environment": "test" } You can assign up to 64 labels. [Google Compute Engine label restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) apply. Label names that start with "goog-" or "google-" are reserved. */
288
+ labels?: {[P in string]: string};
289
+ /** Log preservation policy for the Job. */
290
+ logsPolicy?: LogsPolicy;
291
+ /** Output only. Job name. For example: "projects/123456/locations/us-central1/jobs/job01". */
292
+ name?: string;
293
+ /** Notification configurations. */
294
+ notifications?: JobNotification[];
295
+ /** Priority of the Job. The valid value range is [0, 100). Default value is 0. Higher value indicates higher priority. A job with higher priority value is more likely to run earlier if all other requirements are satisfied. */
296
+ priority?: string;
297
+ /** Output only. Job status. It is read only for users. */
298
+ status?: JobStatus;
299
+ /** Required. TaskGroups in the Job. Only one TaskGroup is supported now. */
300
+ taskGroups?: TaskGroup[];
301
+ /** Output only. A system generated unique ID (in UUID4 format) for the Job. */
302
+ uid?: string;
303
+ /** Output only. The last time the Job was updated. */
304
+ updateTime?: string;
305
+ }
306
+ interface JobNotification {
307
+ /** The attribute requirements of messages to be sent to this Pub/Sub topic. Without this field, no message will be sent. */
308
+ message?: Message;
309
+ /** The Pub/Sub topic where notifications like the job state changes will be published. The topic must exist in the same project as the job and billings will be charged to this project. If not specified, no Pub/Sub messages will be sent. Topic format: `projects/{project}/topics/{topic}`. */
310
+ pubsubTopic?: string;
311
+ }
312
+ interface JobStatus {
313
+ /** The duration of time that the Job spent in status RUNNING. */
314
+ runDuration?: string;
315
+ /** Job state */
316
+ state?: string;
317
+ /** Job status events */
318
+ statusEvents?: StatusEvent[];
319
+ /** Aggregated task status for each TaskGroup in the Job. The map key is TaskGroup ID. */
320
+ taskGroups?: {[P in string]: TaskGroupStatus};
321
+ }
322
+ interface KMSEnvMap {
323
+ /** The value of the cipherText response from the `encrypt` method. */
324
+ cipherText?: string;
325
+ /** The name of the KMS key that will be used to decrypt the cipher text. */
326
+ keyName?: string;
327
+ }
328
+ interface LifecyclePolicy {
329
+ /** Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found. */
330
+ action?: string;
331
+ /** Conditions that decide why a task failure is dealt with a specific action. */
332
+ actionCondition?: ActionCondition;
333
+ }
334
+ interface ListJobsResponse {
335
+ /** Jobs. */
336
+ jobs?: Job[];
337
+ /** Next page token. */
338
+ nextPageToken?: string;
339
+ /** Locations that could not be reached. */
340
+ unreachable?: string[];
341
+ }
342
+ interface ListLocationsResponse {
343
+ /** A list of locations that matches the specified filter in the request. */
344
+ locations?: Location[];
345
+ /** The standard List next-page token. */
346
+ nextPageToken?: string;
347
+ }
348
+ interface ListOperationsResponse {
349
+ /** The standard List next-page token. */
350
+ nextPageToken?: string;
351
+ /** A list of operations that matches the specified filter in the request. */
352
+ operations?: Operation[];
1749
353
  }
354
+ interface ListTasksResponse {
355
+ /** Next page token. */
356
+ nextPageToken?: string;
357
+ /** Tasks. */
358
+ tasks?: Task[];
359
+ /** Locations that could not be reached. */
360
+ unreachable?: string[];
361
+ }
362
+ interface Location {
363
+ /** The friendly name for this location, typically a nearby city name. For example, "Tokyo". */
364
+ displayName?: string;
365
+ /** Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} */
366
+ labels?: {[P in string]: string};
367
+ /** The canonical id for this location. For example: `"us-east1"`. */
368
+ locationId?: string;
369
+ /** Service-specific metadata. For example the available capacity at the given location. */
370
+ metadata?: {[P in string]: any};
371
+ /** Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` */
372
+ name?: string;
373
+ }
374
+ interface LocationPolicy {
375
+ /** A list of allowed location names represented by internal URLs. Each location can be a region or a zone. Only one region or multiple zones in one region is supported now. For example, ["regions/us-central1"] allow VMs in any zones in region us-central1. ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs in zones us-central1-a and us-central1-c. All locations end up in different regions would cause errors. For example, ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", "zones/us-west1-a"] contains 2 regions "us-central1" and "us-west1". An error is expected in this case. */
376
+ allowedLocations?: string[];
377
+ }
378
+ interface LogsPolicy {
379
+ /** Where logs should be saved. */
380
+ destination?: string;
381
+ /** The path to which logs are saved when the destination = PATH. This can be a local file path on the VM, or under the mount point of a Persistent Disk or Filestore, or a Cloud Storage path. */
382
+ logsPath?: string;
383
+ }
384
+ interface Message {
385
+ /** The new job state. */
386
+ newJobState?: string;
387
+ /** The new task state. */
388
+ newTaskState?: string;
389
+ /** The message type. */
390
+ type?: string;
391
+ }
392
+ interface NetworkInterface {
393
+ /** The URL of an existing network resource. You can specify the network as a full or partial URL. For example, the following are all valid URLs: * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} * projects/{project}/global/networks/{network} * global/networks/{network} */
394
+ network?: string;
395
+ /** Default is false (with an external IP address). Required if no external public IP address is attached to the VM. If no external public IP address, additional configuration is required to allow the VM to access Google Services. See https://cloud.google.com/vpc/docs/configure-private-google-access and https://cloud.google.com/nat/docs/gce-example#create-nat for more information. */
396
+ noExternalIpAddress?: boolean;
397
+ /** The URL of an existing subnetwork resource in the network. You can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} * projects/{project}/regions/{region}/subnetworks/{subnetwork} * regions/{region}/subnetworks/{subnetwork} */
398
+ subnetwork?: string;
399
+ }
400
+ interface NetworkPolicy {
401
+ /** Network configurations. */
402
+ networkInterfaces?: NetworkInterface[];
403
+ }
404
+ interface NFS {
405
+ /** Remote source path exported from the NFS, e.g., "/share". */
406
+ remotePath?: string;
407
+ /** The IP address of the NFS. */
408
+ server?: string;
409
+ }
410
+ interface Operation {
411
+ /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
412
+ done?: boolean;
413
+ /** The error result of the operation in case of failure or cancellation. */
414
+ error?: Status;
415
+ /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */
416
+ metadata?: {[P in string]: any};
417
+ /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */
418
+ name?: string;
419
+ /** The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */
420
+ response?: {[P in string]: any};
421
+ }
422
+ interface OperationMetadata {
423
+ /** Output only. API version used to start the operation. */
424
+ apiVersion?: string;
425
+ /** Output only. The time the operation was created. */
426
+ createTime?: string;
427
+ /** Output only. The time the operation finished running. */
428
+ endTime?: string;
429
+ /** Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. */
430
+ requestedCancellation?: boolean;
431
+ /** Output only. Human-readable status of the operation, if any. */
432
+ statusMessage?: string;
433
+ /** Output only. Server-defined resource path for the target of the operation. */
434
+ target?: string;
435
+ /** Output only. Name of the verb executed by the operation. */
436
+ verb?: string;
437
+ }
438
+ interface PlacementPolicy {
439
+ /** UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want VMs to be located close to each other for low network latency between the VMs. No placement policy will be generated when collocation is UNSPECIFIED. */
440
+ collocation?: string;
441
+ /** When specified, causes the job to fail if more than max_distance logical switches are required between VMs. Batch uses the most compact possible placement of VMs even when max_distance is not specified. An explicit max_distance makes that level of compactness a strict requirement. Not yet implemented */
442
+ maxDistance?: string;
443
+ }
444
+ interface ReportAgentStateRequest {
445
+ /** Agent info. */
446
+ agentInfo?: AgentInfo;
447
+ /** Agent timing info. */
448
+ agentTimingInfo?: AgentTimingInfo;
449
+ /** Agent metadata. */
450
+ metadata?: AgentMetadata;
451
+ }
452
+ interface ReportAgentStateResponse {
453
+ /** Default report interval override */
454
+ defaultReportInterval?: string;
455
+ /** Minimum report interval override */
456
+ minReportInterval?: string;
457
+ /** Tasks assigned to the agent */
458
+ tasks?: AgentTask[];
459
+ /** If true, the cloud logging for batch agent will use batch.googleapis.com/Job as monitored resource for Batch job related logging. */
460
+ useBatchMonitoredResource?: boolean;
461
+ }
462
+ interface Runnable {
463
+ /** By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for Runnables that copy output files off of the VM or for debugging. The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables. */
464
+ alwaysRun?: boolean;
465
+ /** This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide debugging support tools like SSH servers). */
466
+ background?: boolean;
467
+ /** Barrier runnable. */
468
+ barrier?: Barrier;
469
+ /** Container runnable. */
470
+ container?: Container;
471
+ /** Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for users to understand the logs. If not provided the index of the runnable will be used for outputs. */
472
+ displayName?: string;
473
+ /** Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup). */
474
+ environment?: Environment;
475
+ /** Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead. */
476
+ ignoreExitStatus?: boolean;
477
+ /** Labels for this Runnable. */
478
+ labels?: {[P in string]: string};
479
+ /** Script runnable. */
480
+ script?: Script;
481
+ /** Timeout for this Runnable. */
482
+ timeout?: string;
483
+ }
484
+ interface Script {
485
+ /** Script file path on the host VM. To specify an interpreter, please add a `#!`(also known as [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the file.(For example, to execute the script using bash, `#!/bin/bash` should be the first line of the file. To execute the script using`Python3`, `#!/usr/bin/env python3` should be the first line of the file.) Otherwise, the file will by default be excuted by `/bin/sh`. */
486
+ path?: string;
487
+ /** Shell script text. To specify an interpreter, please add a `#!\n` at the beginning of the text.(For example, to execute the script using bash, `#!/bin/bash\n` should be added. To execute the script using`Python3`, `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by default be excuted by `/bin/sh`. */
488
+ text?: string;
489
+ }
490
+ interface ServiceAccount {
491
+ /** Email address of the service account. If not specified, the default Compute Engine service account for the project will be used. If instance template is being used, the service account has to be specified in the instance template and it has to match the email field here. */
492
+ email?: string;
493
+ /** List of scopes to be enabled for this service account on the VM, in addition to the cloud-platform API scope that will be added by default. */
494
+ scopes?: string[];
495
+ }
496
+ interface Status {
497
+ /** The status code, which should be an enum value of google.rpc.Code. */
498
+ code?: number;
499
+ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
500
+ details?: Array<{[P in string]: any}>;
501
+ /** A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */
502
+ message?: string;
503
+ }
504
+ interface StatusEvent {
505
+ /** Description of the event. */
506
+ description?: string;
507
+ /** The time this event occurred. */
508
+ eventTime?: string;
509
+ /** Task Execution */
510
+ taskExecution?: TaskExecution;
511
+ /** Task State */
512
+ taskState?: string;
513
+ /** Type of the event. */
514
+ type?: string;
515
+ }
516
+ interface Task {
517
+ /** Task name. The name is generated from the parent TaskGroup name and 'id' field. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". */
518
+ name?: string;
519
+ /** Task Status. */
520
+ status?: TaskStatus;
521
+ }
522
+ interface TaskExecution {
523
+ /** When task is completed as the status of FAILED or SUCCEEDED, exit code is for one task execution result, default is 0 as success. */
524
+ exitCode?: number;
525
+ }
526
+ interface TaskGroup {
527
+ /** Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". */
528
+ name?: string;
529
+ /** Max number of tasks that can run in parallel. Default to min(task_count, parallel tasks per job limit). See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). Field parallelism must be 1 if the scheduling_policy is IN_ORDER. */
530
+ parallelism?: string;
531
+ /** When true, Batch will configure SSH to allow passwordless login between VMs running the Batch tasks in the same TaskGroup. */
532
+ permissiveSsh?: boolean;
533
+ /** When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false. */
534
+ requireHostsFile?: boolean;
535
+ /** Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE. */
536
+ schedulingPolicy?: string;
537
+ /** Number of Tasks in the TaskGroup. Default is 1. */
538
+ taskCount?: string;
539
+ /** Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements. */
540
+ taskCountPerNode?: string;
541
+ /** An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). */
542
+ taskEnvironments?: Environment[];
543
+ /** Required. Tasks in the group share the same task spec. */
544
+ taskSpec?: TaskSpec;
545
+ }
546
+ interface TaskGroupStatus {
547
+ /** Count of task in each state in the TaskGroup. The map key is task state name. */
548
+ counts?: {[P in string]: string};
549
+ /** Status of instances allocated for the TaskGroup. */
550
+ instances?: InstanceStatus[];
551
+ }
552
+ interface TaskSpec {
553
+ /** ComputeResource requirements. */
554
+ computeResource?: ComputeResource;
555
+ /** Environment variables to set before running the Task. */
556
+ environment?: Environment;
557
+ /** Deprecated: please use environment(non-plural) instead. */
558
+ environments?: {[P in string]: string};
559
+ /** Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count. */
560
+ lifecyclePolicies?: LifecyclePolicy[];
561
+ /** Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10]. */
562
+ maxRetryCount?: number;
563
+ /** Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit. */
564
+ maxRunDuration?: string;
565
+ /** The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures. */
566
+ runnables?: Runnable[];
567
+ /** Volumes to mount before running Tasks using this TaskSpec. */
568
+ volumes?: Volume[];
569
+ }
570
+ interface TaskStatus {
571
+ /** Task state */
572
+ state?: string;
573
+ /** Detailed info about why the state is reached. */
574
+ statusEvents?: StatusEvent[];
575
+ }
576
+ interface Volume {
577
+ /** Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template. */
578
+ deviceName?: string;
579
+ /** A Google Cloud Storage (GCS) volume. */
580
+ gcs?: GCS;
581
+ /** For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). For existing persistent disks, mount options provided by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html). */
582
+ mountOptions?: string[];
583
+ /** The mount path for the volume, e.g. /mnt/disks/share. */
584
+ mountPath?: string;
585
+ /** A Network File System (NFS) volume. For example, a Filestore file share. */
586
+ nfs?: NFS;
587
+ }
588
+ interface TasksResource {
589
+ /** Return a single Task. */
590
+ get(request?: {
591
+ /** V1 error format. */
592
+ '$.xgafv'?: string;
593
+ /** OAuth access token. */
594
+ access_token?: string;
595
+ /** Data format for response. */
596
+ alt?: string;
597
+ /** JSONP */
598
+ callback?: string;
599
+ /** Selector specifying which fields to include in a partial response. */
600
+ fields?: string;
601
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
602
+ key?: string;
603
+ /** Required. Task name. */
604
+ name: string;
605
+ /** OAuth 2.0 token for the current user. */
606
+ oauth_token?: string;
607
+ /** Returns response with indentations and line breaks. */
608
+ prettyPrint?: boolean;
609
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
610
+ quotaUser?: string;
611
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
612
+ upload_protocol?: string;
613
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
614
+ uploadType?: string;
615
+ }): Request<Task>;
616
+ /** List Tasks associated with a job. */
617
+ list(request?: {
618
+ /** V1 error format. */
619
+ '$.xgafv'?: string;
620
+ /** OAuth access token. */
621
+ access_token?: string;
622
+ /** Data format for response. */
623
+ alt?: string;
624
+ /** JSONP */
625
+ callback?: string;
626
+ /** Selector specifying which fields to include in a partial response. */
627
+ fields?: string;
628
+ /** Task filter, null filter matches all Tasks. Filter string should be of the format State=TaskStatus.State e.g. State=RUNNING */
629
+ filter?: string;
630
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
631
+ key?: string;
632
+ /** OAuth 2.0 token for the current user. */
633
+ oauth_token?: string;
634
+ /** Page size. */
635
+ pageSize?: number;
636
+ /** Page token. */
637
+ pageToken?: string;
638
+ /** Required. Name of a TaskGroup from which Tasks are being requested. Pattern: "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" */
639
+ parent: string;
640
+ /** Returns response with indentations and line breaks. */
641
+ prettyPrint?: boolean;
642
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
643
+ quotaUser?: string;
644
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
645
+ upload_protocol?: string;
646
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
647
+ uploadType?: string;
648
+ }): Request<ListTasksResponse>;
649
+ }
650
+ interface TaskGroupsResource {
651
+ tasks: TasksResource;
652
+ }
653
+ interface JobsResource {
654
+ /** Create a Job. */
655
+ create(request: {
656
+ /** V1 error format. */
657
+ '$.xgafv'?: string;
658
+ /** OAuth access token. */
659
+ access_token?: string;
660
+ /** Data format for response. */
661
+ alt?: string;
662
+ /** JSONP */
663
+ callback?: string;
664
+ /** Selector specifying which fields to include in a partial response. */
665
+ fields?: string;
666
+ /** ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set. The job.name field in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}". */
667
+ jobId?: string;
668
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
669
+ key?: string;
670
+ /** OAuth 2.0 token for the current user. */
671
+ oauth_token?: string;
672
+ /** Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}" */
673
+ parent: string;
674
+ /** Returns response with indentations and line breaks. */
675
+ prettyPrint?: boolean;
676
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
677
+ quotaUser?: string;
678
+ /** Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */
679
+ requestId?: string;
680
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
681
+ upload_protocol?: string;
682
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
683
+ uploadType?: string;
684
+ /** Request body */
685
+ resource: Job;
686
+ }): Request<Job>;
687
+ create(
688
+ request: {
689
+ /** V1 error format. */
690
+ '$.xgafv'?: string;
691
+ /** OAuth access token. */
692
+ access_token?: string;
693
+ /** Data format for response. */
694
+ alt?: string;
695
+ /** JSONP */
696
+ callback?: string;
697
+ /** Selector specifying which fields to include in a partial response. */
698
+ fields?: string;
699
+ /** ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set. The job.name field in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}". */
700
+ jobId?: string;
701
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
702
+ key?: string;
703
+ /** OAuth 2.0 token for the current user. */
704
+ oauth_token?: string;
705
+ /** Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}" */
706
+ parent: string;
707
+ /** Returns response with indentations and line breaks. */
708
+ prettyPrint?: boolean;
709
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
710
+ quotaUser?: string;
711
+ /** Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */
712
+ requestId?: string;
713
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
714
+ upload_protocol?: string;
715
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
716
+ uploadType?: string;
717
+ },
718
+ body: Job
719
+ ): Request<Job>;
720
+ /** Delete a Job. */
721
+ delete(request?: {
722
+ /** V1 error format. */
723
+ '$.xgafv'?: string;
724
+ /** OAuth access token. */
725
+ access_token?: string;
726
+ /** Data format for response. */
727
+ alt?: string;
728
+ /** JSONP */
729
+ callback?: string;
730
+ /** Selector specifying which fields to include in a partial response. */
731
+ fields?: string;
732
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
733
+ key?: string;
734
+ /** Job name. */
735
+ name: string;
736
+ /** OAuth 2.0 token for the current user. */
737
+ oauth_token?: string;
738
+ /** Returns response with indentations and line breaks. */
739
+ prettyPrint?: boolean;
740
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
741
+ quotaUser?: string;
742
+ /** Optional. Reason for this deletion. */
743
+ reason?: string;
744
+ /** Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */
745
+ requestId?: string;
746
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
747
+ upload_protocol?: string;
748
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
749
+ uploadType?: string;
750
+ }): Request<Operation>;
751
+ /** Get a Job specified by its resource name. */
752
+ get(request?: {
753
+ /** V1 error format. */
754
+ '$.xgafv'?: string;
755
+ /** OAuth access token. */
756
+ access_token?: string;
757
+ /** Data format for response. */
758
+ alt?: string;
759
+ /** JSONP */
760
+ callback?: string;
761
+ /** Selector specifying which fields to include in a partial response. */
762
+ fields?: string;
763
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
764
+ key?: string;
765
+ /** Required. Job name. */
766
+ name: string;
767
+ /** OAuth 2.0 token for the current user. */
768
+ oauth_token?: string;
769
+ /** Returns response with indentations and line breaks. */
770
+ prettyPrint?: boolean;
771
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
772
+ quotaUser?: string;
773
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
774
+ upload_protocol?: string;
775
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
776
+ uploadType?: string;
777
+ }): Request<Job>;
778
+ /** List all Jobs for a project within a region. */
779
+ list(request?: {
780
+ /** V1 error format. */
781
+ '$.xgafv'?: string;
782
+ /** OAuth access token. */
783
+ access_token?: string;
784
+ /** Data format for response. */
785
+ alt?: string;
786
+ /** JSONP */
787
+ callback?: string;
788
+ /** Selector specifying which fields to include in a partial response. */
789
+ fields?: string;
790
+ /** List filter. */
791
+ filter?: string;
792
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
793
+ key?: string;
794
+ /** OAuth 2.0 token for the current user. */
795
+ oauth_token?: string;
796
+ /** Optional. Sort results. Supported are "name", "name desc", "create_time", and "create_time desc". */
797
+ orderBy?: string;
798
+ /** Page size. */
799
+ pageSize?: number;
800
+ /** Page token. */
801
+ pageToken?: string;
802
+ /** Parent path. */
803
+ parent: string;
804
+ /** Returns response with indentations and line breaks. */
805
+ prettyPrint?: boolean;
806
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
807
+ quotaUser?: string;
808
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
809
+ upload_protocol?: string;
810
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
811
+ uploadType?: string;
812
+ }): Request<ListJobsResponse>;
813
+ taskGroups: TaskGroupsResource;
814
+ }
815
+ interface OperationsResource {
816
+ /** Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. */
817
+ cancel(request: {
818
+ /** V1 error format. */
819
+ '$.xgafv'?: string;
820
+ /** OAuth access token. */
821
+ access_token?: string;
822
+ /** Data format for response. */
823
+ alt?: string;
824
+ /** JSONP */
825
+ callback?: string;
826
+ /** Selector specifying which fields to include in a partial response. */
827
+ fields?: string;
828
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
829
+ key?: string;
830
+ /** The name of the operation resource to be cancelled. */
831
+ name: string;
832
+ /** OAuth 2.0 token for the current user. */
833
+ oauth_token?: string;
834
+ /** Returns response with indentations and line breaks. */
835
+ prettyPrint?: boolean;
836
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
837
+ quotaUser?: string;
838
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
839
+ upload_protocol?: string;
840
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
841
+ uploadType?: string;
842
+ /** Request body */
843
+ resource: CancelOperationRequest;
844
+ }): Request<{}>;
845
+ cancel(
846
+ request: {
847
+ /** V1 error format. */
848
+ '$.xgafv'?: string;
849
+ /** OAuth access token. */
850
+ access_token?: string;
851
+ /** Data format for response. */
852
+ alt?: string;
853
+ /** JSONP */
854
+ callback?: string;
855
+ /** Selector specifying which fields to include in a partial response. */
856
+ fields?: string;
857
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
858
+ key?: string;
859
+ /** The name of the operation resource to be cancelled. */
860
+ name: string;
861
+ /** OAuth 2.0 token for the current user. */
862
+ oauth_token?: string;
863
+ /** Returns response with indentations and line breaks. */
864
+ prettyPrint?: boolean;
865
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
866
+ quotaUser?: string;
867
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
868
+ upload_protocol?: string;
869
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
870
+ uploadType?: string;
871
+ },
872
+ body: CancelOperationRequest
873
+ ): Request<{}>;
874
+ /** Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. */
875
+ delete(request?: {
876
+ /** V1 error format. */
877
+ '$.xgafv'?: string;
878
+ /** OAuth access token. */
879
+ access_token?: string;
880
+ /** Data format for response. */
881
+ alt?: string;
882
+ /** JSONP */
883
+ callback?: string;
884
+ /** Selector specifying which fields to include in a partial response. */
885
+ fields?: string;
886
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
887
+ key?: string;
888
+ /** The name of the operation resource to be deleted. */
889
+ name: string;
890
+ /** OAuth 2.0 token for the current user. */
891
+ oauth_token?: string;
892
+ /** Returns response with indentations and line breaks. */
893
+ prettyPrint?: boolean;
894
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
895
+ quotaUser?: string;
896
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
897
+ upload_protocol?: string;
898
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
899
+ uploadType?: string;
900
+ }): Request<{}>;
901
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
902
+ get(request?: {
903
+ /** V1 error format. */
904
+ '$.xgafv'?: string;
905
+ /** OAuth access token. */
906
+ access_token?: string;
907
+ /** Data format for response. */
908
+ alt?: string;
909
+ /** JSONP */
910
+ callback?: string;
911
+ /** Selector specifying which fields to include in a partial response. */
912
+ fields?: string;
913
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
914
+ key?: string;
915
+ /** The name of the operation resource. */
916
+ name: string;
917
+ /** OAuth 2.0 token for the current user. */
918
+ oauth_token?: string;
919
+ /** Returns response with indentations and line breaks. */
920
+ prettyPrint?: boolean;
921
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
922
+ quotaUser?: string;
923
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
924
+ upload_protocol?: string;
925
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
926
+ uploadType?: string;
927
+ }): Request<Operation>;
928
+ /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
929
+ list(request?: {
930
+ /** V1 error format. */
931
+ '$.xgafv'?: string;
932
+ /** OAuth access token. */
933
+ access_token?: string;
934
+ /** Data format for response. */
935
+ alt?: string;
936
+ /** JSONP */
937
+ callback?: string;
938
+ /** Selector specifying which fields to include in a partial response. */
939
+ fields?: string;
940
+ /** The standard list filter. */
941
+ filter?: string;
942
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
943
+ key?: string;
944
+ /** The name of the operation's parent resource. */
945
+ name: string;
946
+ /** OAuth 2.0 token for the current user. */
947
+ oauth_token?: string;
948
+ /** The standard list page size. */
949
+ pageSize?: number;
950
+ /** The standard list page token. */
951
+ pageToken?: string;
952
+ /** Returns response with indentations and line breaks. */
953
+ prettyPrint?: boolean;
954
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
955
+ quotaUser?: string;
956
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
957
+ upload_protocol?: string;
958
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
959
+ uploadType?: string;
960
+ }): Request<ListOperationsResponse>;
961
+ }
962
+ interface StateResource {
963
+ /** Report agent's state, e.g. agent status and tasks information */
964
+ report(request: {
965
+ /** V1 error format. */
966
+ '$.xgafv'?: string;
967
+ /** OAuth access token. */
968
+ access_token?: string;
969
+ /** Data format for response. */
970
+ alt?: string;
971
+ /** JSONP */
972
+ callback?: string;
973
+ /** Selector specifying which fields to include in a partial response. */
974
+ fields?: string;
975
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
976
+ key?: string;
977
+ /** OAuth 2.0 token for the current user. */
978
+ oauth_token?: string;
979
+ /** Required. Format: projects/{project}/locations/{location} {project} should be a project number. */
980
+ parent: string;
981
+ /** Returns response with indentations and line breaks. */
982
+ prettyPrint?: boolean;
983
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
984
+ quotaUser?: string;
985
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
986
+ upload_protocol?: string;
987
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
988
+ uploadType?: string;
989
+ /** Request body */
990
+ resource: ReportAgentStateRequest;
991
+ }): Request<ReportAgentStateResponse>;
992
+ report(
993
+ request: {
994
+ /** V1 error format. */
995
+ '$.xgafv'?: string;
996
+ /** OAuth access token. */
997
+ access_token?: string;
998
+ /** Data format for response. */
999
+ alt?: string;
1000
+ /** JSONP */
1001
+ callback?: string;
1002
+ /** Selector specifying which fields to include in a partial response. */
1003
+ fields?: string;
1004
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1005
+ key?: string;
1006
+ /** OAuth 2.0 token for the current user. */
1007
+ oauth_token?: string;
1008
+ /** Required. Format: projects/{project}/locations/{location} {project} should be a project number. */
1009
+ parent: string;
1010
+ /** Returns response with indentations and line breaks. */
1011
+ prettyPrint?: boolean;
1012
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1013
+ quotaUser?: string;
1014
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1015
+ upload_protocol?: string;
1016
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1017
+ uploadType?: string;
1018
+ },
1019
+ body: ReportAgentStateRequest
1020
+ ): Request<ReportAgentStateResponse>;
1021
+ }
1022
+ interface LocationsResource {
1023
+ /** Gets information about a location. */
1024
+ get(request?: {
1025
+ /** V1 error format. */
1026
+ '$.xgafv'?: string;
1027
+ /** OAuth access token. */
1028
+ access_token?: string;
1029
+ /** Data format for response. */
1030
+ alt?: string;
1031
+ /** JSONP */
1032
+ callback?: string;
1033
+ /** Selector specifying which fields to include in a partial response. */
1034
+ fields?: string;
1035
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1036
+ key?: string;
1037
+ /** Resource name for the location. */
1038
+ name: string;
1039
+ /** OAuth 2.0 token for the current user. */
1040
+ oauth_token?: string;
1041
+ /** Returns response with indentations and line breaks. */
1042
+ prettyPrint?: boolean;
1043
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1044
+ quotaUser?: string;
1045
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1046
+ upload_protocol?: string;
1047
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1048
+ uploadType?: string;
1049
+ }): Request<Location>;
1050
+ /** Lists information about the supported locations for this service. */
1051
+ list(request?: {
1052
+ /** V1 error format. */
1053
+ '$.xgafv'?: string;
1054
+ /** OAuth access token. */
1055
+ access_token?: string;
1056
+ /** Data format for response. */
1057
+ alt?: string;
1058
+ /** JSONP */
1059
+ callback?: string;
1060
+ /** Selector specifying which fields to include in a partial response. */
1061
+ fields?: string;
1062
+ /** A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). */
1063
+ filter?: string;
1064
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1065
+ key?: string;
1066
+ /** The resource that owns the locations collection, if applicable. */
1067
+ name: string;
1068
+ /** OAuth 2.0 token for the current user. */
1069
+ oauth_token?: string;
1070
+ /** The maximum number of results to return. If not set, the service selects a default. */
1071
+ pageSize?: number;
1072
+ /** A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */
1073
+ pageToken?: string;
1074
+ /** Returns response with indentations and line breaks. */
1075
+ prettyPrint?: boolean;
1076
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1077
+ quotaUser?: string;
1078
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1079
+ upload_protocol?: string;
1080
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1081
+ uploadType?: string;
1082
+ }): Request<ListLocationsResponse>;
1083
+ jobs: JobsResource;
1084
+ operations: OperationsResource;
1085
+ state: StateResource;
1086
+ }
1087
+ interface ProjectsResource {
1088
+ locations: LocationsResource;
1089
+ }
1090
+
1091
+ const projects: ProjectsResource;
1092
+ }
1750
1093
  }