1import type * as speech from "@distilled.cloud/gcp/speech_v1";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { CustomClass } from "./CustomClass.ts";
6
7export interface GetCustomClassRequest extends Omit<
8 speech.GetProjectsLocationsCustomClassesRequest,
9 "name"
10> {}
11
12/**
13 * Runtime binding for Speech-to-Text `customClasses.get`.
14 *
15 * Bind this operation to a {@link CustomClass} in a Function/Action
16 * init phase. Provide {@link GetCustomClassHttp}.
17 *
18 * Grants `roles/speech.client` on the project because Speech-to-Text has no
19 * resource-level IAM.
20 *
21 * ### Reading a Custom Class
22 * **Example:** Read the bound custom class
23 * ```typescript
24 * const getClass = yield* GCP.Speech.GetCustomClass(ships);
25 * const live = yield* getClass();
26 * ```
27 *
28 * @binding
29 * @category Speech
30 */
31export interface GetCustomClass extends Binding.Service<
32 GetCustomClass,
33 "GCP.Speech.GetCustomClass",
34 (
35 customClass: CustomClass,
36 ) => Effect.Effect<
37 (
38 request?: GetCustomClassRequest,
39 ) => Effect.Effect<
40 speech.CustomClass,
41 speech.GetProjectsLocationsCustomClassesError,
42 RuntimeContext
43 >
44 >
45> {}
46
47export const GetCustomClass = Binding.Service<GetCustomClass>(
48 "GCP.Speech.GetCustomClass",
49);