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 { PhraseSet } from "./PhraseSet.ts";
6
7export interface GetPhraseSetRequest extends Omit<
8 speech.GetProjectsLocationsPhraseSetsRequest,
9 "name"
10> {}
11
12/**
13 * Runtime binding for Speech-to-Text `phraseSets.get`.
14 *
15 * Bind this operation to a {@link PhraseSet} in a Function/Action init
16 * phase. Provide {@link GetPhraseSetHttp}.
17 *
18 * Grants `roles/speech.client` on the project because Speech-to-Text has no
19 * resource-level IAM.
20 *
21 * ### Reading a Phrase Set
22 * **Example:** Read the bound phrase set
23 * ```typescript
24 * const getPhraseSet = yield* GCP.Speech.GetPhraseSet(hints);
25 * const live = yield* getPhraseSet();
26 * ```
27 *
28 * @binding
29 * @category Speech
30 */
31export interface GetPhraseSet extends Binding.Service<
32 GetPhraseSet,
33 "GCP.Speech.GetPhraseSet",
34 (
35 phraseSet: PhraseSet,
36 ) => Effect.Effect<
37 (
38 request?: GetPhraseSetRequest,
39 ) => Effect.Effect<
40 speech.PhraseSet,
41 speech.GetProjectsLocationsPhraseSetsError,
42 RuntimeContext
43 >
44 >
45> {}
46
47export const GetPhraseSet = Binding.Service<GetPhraseSet>(
48 "GCP.Speech.GetPhraseSet",
49);