1import type * as servicedirectory from "@distilled.cloud/gcp/servicedirectory_v1";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { Endpoint } from "./Endpoint.ts";
6
7export interface GetEndpointRequest extends Omit<
8 servicedirectory.GetProjectsLocationsNamespacesServicesEndpointsRequest,
9 "name"
10> {}
11
12/**
13 * Runtime binding for Service Directory `endpoints.get`.
14 *
15 * Bind this operation to an {@link Endpoint} in a Function/Action init
16 * phase. Provide {@link GetEndpointHttp}.
17 *
18 * ### Reading an Endpoint
19 * **Example:** Get the bound endpoint
20 * ```typescript
21 * const getEndpoint = yield* GCP.ServiceDirectory.GetEndpoint(api);
22 * const live = yield* getEndpoint();
23 * ```
24 *
25 * @binding
26 * @category ServiceDirectory
27 */
28export interface GetEndpoint extends Binding.Service<
29 GetEndpoint,
30 "GCP.ServiceDirectory.GetEndpoint",
31 (
32 endpoint: Endpoint,
33 ) => Effect.Effect<
34 (
35 request?: GetEndpointRequest,
36 ) => Effect.Effect<
37 servicedirectory.Endpoint,
38 servicedirectory.GetProjectsLocationsNamespacesServicesEndpointsError,
39 RuntimeContext
40 >
41 >
42> {}
43
44export const GetEndpoint = Binding.Service<GetEndpoint>(
45 "GCP.ServiceDirectory.GetEndpoint",
46);