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 { InstancesSnapshot } from "./InstancesSnapshot.ts";
6
7export interface GetInstancesSnapshotRequest extends Omit<
8 file.GetProjectsLocationsInstancesSnapshotsRequest,
9 "name"
10> {}
11
12/**
13 * Runtime binding for Cloud Filestore `snapshots.get`.
14 *
15 * Bind this operation to an {@link InstancesSnapshot} in a
16 * Function/Action init phase. Provide {@link GetInstancesSnapshotHttp}.
17 *
18 * ### Observing Snapshots
19 * **Example:** Read the bound snapshot
20 * ```typescript
21 * const getSnapshot = yield* GCP.Filestore.GetInstancesSnapshot(snap);
22 * const live = yield* getSnapshot();
23 * ```
24 *
25 * @binding
26 * @category Filestore
27 */
28export interface GetInstancesSnapshot extends Binding.Service<
29 GetInstancesSnapshot,
30 "GCP.Filestore.GetInstancesSnapshot",
31 (
32 snapshot: InstancesSnapshot,
33 ) => Effect.Effect<
34 (
35 request?: GetInstancesSnapshotRequest,
36 ) => Effect.Effect<
37 file.Snapshot,
38 file.GetProjectsLocationsInstancesSnapshotsError,
39 RuntimeContext
40 >
41 >
42> {}
43
44export const GetInstancesSnapshot = Binding.Service<GetInstancesSnapshot>(
45 "GCP.Filestore.GetInstancesSnapshot",
46);