1import type * as ml from "@distilled.cloud/gcp/ml_v1";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { ModelsVersion } from "./ModelsVersion.ts";
6
7export interface GetVersionRequest extends Omit<
8 ml.GetProjectsModelsVersionsRequest,
9 "name"
10> {}
11
12/**
13 * Runtime binding for AI Platform (legacy ML Engine) `versions.get`.
14 *
15 * Bind this operation to a {@link ModelsVersion} in a Function/Action
16 * init phase. Provide {@link GetVersionHttp}.
17 *
18 * ### Reading a Version
19 * **Example:** Get the bound version
20 * ```typescript
21 * const getVersion = yield* GCP.ML.GetVersion(version);
22 * const live = yield* getVersion();
23 * ```
24 *
25 * @binding
26 * @category ML
27 */
28export interface GetVersion extends Binding.Service<
29 GetVersion,
30 "GCP.ML.GetVersion",
31 (
32 version: ModelsVersion,
33 ) => Effect.Effect<
34 (
35 request?: GetVersionRequest,
36 ) => Effect.Effect<
37 ml.GoogleCloudMlV1__Version,
38 ml.GetProjectsModelsVersionsError,
39 RuntimeContext
40 >
41 >
42> {}
43
44export const GetVersion = Binding.Service<GetVersion>("GCP.ML.GetVersion");