| 1 | import type * as cw from "@distilled.cloud/gcp/contentwarehouse_v1"; |
| 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 { SynonymSet } from "./SynonymSet.ts"; |
| 6 | |
| 7 | export 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 | */ |
| 32 | export 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 | |
| 48 | export const GetSynonymSet = Binding.Service<GetSynonymSet>( |
| 49 | "GCP.ContentWarehouse.GetSynonymSet", |
| 50 | ); |