| 1 | import * as speech from "@distilled.cloud/gcp/speech_v1"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makePhraseSetHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { GetPhraseSet, type GetPhraseSetRequest } from "./GetPhraseSet.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link GetPhraseSet}. |
| 8 | * |
| 9 | * @layer |
| 10 | * @provides GCP.Speech.GetPhraseSet |
| 11 | */ |
| 12 | export const GetPhraseSetHttp = Layer.effect( |
| 13 | GetPhraseSet, |
| 14 | makePhraseSetHttpBinding< |
| 15 | speech.GetProjectsLocationsPhraseSetsRequest, |
| 16 | speech.PhraseSet, |
| 17 | speech.GetProjectsLocationsPhraseSetsError, |
| 18 | GetPhraseSetRequest |
| 19 | >({ |
| 20 | tag: "GCP.Speech.GetPhraseSet", |
| 21 | operation: speech.getProjectsLocationsPhraseSets, |
| 22 | iam: { role: "roles/speech.client" }, |
| 23 | toInput: (name) => ({ name }), |
| 24 | }), |
| 25 | ); |