1import type * as file from "@distilled.cloud/gcp/file_v1";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { Backup } from "./Backup.ts";
6
7export interface GetBackupRequest extends Omit<
8 file.GetProjectsLocationsBackupsRequest,
9 "name"
10> {}
11
12/**
13 * Runtime binding for Cloud Filestore `backups.get`.
14 *
15 * Bind this operation to a {@link Backup} in a Function/Action init
16 * phase. Provide {@link GetBackupHttp}.
17 *
18 * ### Observing Backups
19 * **Example:** Read the bound backup
20 * ```typescript
21 * const getBackup = yield* GCP.Filestore.GetBackup(backup);
22 * const live = yield* getBackup();
23 * ```
24 *
25 * @binding
26 * @category Filestore
27 */
28export interface GetBackup extends Binding.Service<
29 GetBackup,
30 "GCP.Filestore.GetBackup",
31 (
32 backup: Backup,
33 ) => Effect.Effect<
34 (
35 request?: GetBackupRequest,
36 ) => Effect.Effect<
37 file.Backup,
38 file.GetProjectsLocationsBackupsError,
39 RuntimeContext
40 >
41 >
42> {}
43
44export const GetBackup = Binding.Service<GetBackup>("GCP.Filestore.GetBackup");