1import type * as cw from "@distilled.cloud/gcp/contentwarehouse_v1";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { SynonymSet } from "./SynonymSet.ts";
6
7export interface GetSynonymSetRequest extends Omit<
8 cw.GetProjectsLocationsSynonymSetsRequest,
9 "name"
10> {}
11
12/**
13 * Runtime binding for Document AI Warehouse `synonymSets.get`.
14 *
15 * Grants `roles/contentwarehouse.admin` on the project because
16 * `contentwarehouse.synonymSets.get` is only in that role and Document AI
17 * Warehouse has no per-resource IAM.
18 *
19 * Bind this operation to a {@link SynonymSet} in a Function/Action init
20 * phase. Provide {@link GetSynonymSetHttp}.
21 *
22 * ### Reading Synonym Sets
23 * **Example:** Read the bound synonym set
24 * ```typescript
25 * const getSynonyms = yield* GCP.ContentWarehouse.GetSynonymSet(synonyms);
26 * const live = yield* getSynonyms();
27 * ```
28 *
29 * @binding
30 * @category ContentWarehouse
31 */
32export interface GetSynonymSet extends Binding.Service<
33 GetSynonymSet,
34 "GCP.ContentWarehouse.GetSynonymSet",
35 (
36 synonymSet: SynonymSet,
37 ) => Effect.Effect<
38 (
39 request?: GetSynonymSetRequest,
40 ) => Effect.Effect<
41 cw.GoogleCloudContentwarehouseV1SynonymSet,
42 cw.GetProjectsLocationsSynonymSetsError,
43 RuntimeContext
44 >
45 >
46> {}
47
48export const GetSynonymSet = Binding.Service<GetSynonymSet>(
49 "GCP.ContentWarehouse.GetSynonymSet",
50);