| 1 | import * as speech from "@distilled.cloud/gcp/speech_v1"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeCustomClassHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { |
| 5 | GetCustomClass, |
| 6 | type GetCustomClassRequest, |
| 7 | } from "./GetCustomClass.ts"; |
| 8 | |
| 9 | /** |
| 10 | * HTTP implementation of {@link GetCustomClass}. |
| 11 | * |
| 12 | * @layer |
| 13 | * @provides GCP.Speech.GetCustomClass |
| 14 | */ |
| 15 | export const GetCustomClassHttp = Layer.effect( |
| 16 | GetCustomClass, |
| 17 | makeCustomClassHttpBinding< |
| 18 | speech.GetProjectsLocationsCustomClassesRequest, |
| 19 | speech.CustomClass, |
| 20 | speech.GetProjectsLocationsCustomClassesError, |
| 21 | GetCustomClassRequest |
| 22 | >({ |
| 23 | tag: "GCP.Speech.GetCustomClass", |
| 24 | operation: speech.getProjectsLocationsCustomClasses, |
| 25 | iam: { role: "roles/speech.client" }, |
| 26 | toInput: (name) => ({ name }), |
| 27 | }), |
| 28 | ); |