| 1 | import type * as translate from "@distilled.cloud/gcp/translate_v3"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { RuntimeContext } from "../../RuntimeContext.ts"; |
| 5 | import type { Model } from "./Model.ts"; |
| 6 | |
| 7 | export interface GetModelRequest extends Omit< |
| 8 | translate.GetProjectsLocationsModelsRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Cloud Translation `models.get`. |
| 14 | * |
| 15 | * Bind this operation to a {@link Model} in a Function/Action init |
| 16 | * phase. Provide {@link GetModelHttp}. |
| 17 | * |
| 18 | * ### Reading a Model |
| 19 | * **Example:** Read the bound model |
| 20 | * ```typescript |
| 21 | * const getModel = yield* GCP.Translate.GetModel(model); |
| 22 | * const live = yield* getModel(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | * @category Translate |
| 27 | */ |
| 28 | export interface GetModel extends Binding.Service< |
| 29 | GetModel, |
| 30 | "GCP.Translate.GetModel", |
| 31 | ( |
| 32 | model: Model, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request?: GetModelRequest, |
| 36 | ) => Effect.Effect< |
| 37 | translate.Model, |
| 38 | translate.GetProjectsLocationsModelsError, |
| 39 | RuntimeContext |
| 40 | > |
| 41 | > |
| 42 | > {} |
| 43 | |
| 44 | export const GetModel = Binding.Service<GetModel>("GCP.Translate.GetModel"); |