| 1 | import * as datapipelines from "@distilled.cloud/gcp/datapipelines_v1"; |
| 2 | import { Credentials } from "@distilled.cloud/gcp/Credentials"; |
| 3 | import * as Layer from "effect/Layer"; |
| 4 | import * as HttpClient from "effect/http/HttpClient"; |
| 5 | import { makePipelineHttpBinding } from "./BindingHttp.ts"; |
| 6 | import { StopPipeline } from "./StopPipeline.ts"; |
| 7 | |
| 8 | /** |
| 9 | * HTTP implementation of {@link StopPipeline}. |
| 10 | * |
| 11 | * @layer |
| 12 | * @provides GCP.DataPipelines.StopPipeline |
| 13 | */ |
| 14 | export const StopPipelineHttp: Layer.Layer< |
| 15 | StopPipeline, |
| 16 | never, |
| 17 | Credentials | HttpClient.HttpClient |
| 18 | > = Layer.effect( |
| 19 | StopPipeline, |
| 20 | makePipelineHttpBinding< |
| 21 | datapipelines.StopProjectsLocationsPipelinesRequest, |
| 22 | datapipelines.GoogleCloudDatapipelinesV1Pipeline, |
| 23 | datapipelines.StopProjectsLocationsPipelinesError |
| 24 | >({ |
| 25 | tag: "GCP.DataPipelines.StopPipeline", |
| 26 | // No narrower predefined role contains datapipelines.pipelines.stop. |
| 27 | iam: { role: "roles/datapipelines.admin" }, |
| 28 | operation: datapipelines.stopProjectsLocationsPipelines, |
| 29 | }), |
| 30 | ); |