| 1 | import type * as alloydb from "@distilled.cloud/gcp/alloydb_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 { ClustersUser } from "./ClustersUser.ts"; |
| 6 | |
| 7 | export interface GetUserRequest extends Omit< |
| 8 | alloydb.GetProjectsLocationsClustersUsersRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for AlloyDB `users.get`. |
| 14 | * |
| 15 | * Bind this operation to a {@link ClustersUser} in a Function/Action |
| 16 | * init phase. Provide {@link GetUserHttp}. |
| 17 | * |
| 18 | * ### Observing Users |
| 19 | * **Example:** Read the bound user |
| 20 | * ```typescript |
| 21 | * const getUser = yield* GCP.AlloyDB.GetUser(appUser); |
| 22 | * const live = yield* getUser(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | * @category AlloyDB |
| 27 | */ |
| 28 | export interface GetUser extends Binding.Service< |
| 29 | GetUser, |
| 30 | "GCP.AlloyDB.GetUser", |
| 31 | ( |
| 32 | user: ClustersUser, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request?: GetUserRequest, |
| 36 | ) => Effect.Effect< |
| 37 | alloydb.User, |
| 38 | alloydb.GetProjectsLocationsClustersUsersError, |
| 39 | RuntimeContext |
| 40 | > |
| 41 | > |
| 42 | > {} |
| 43 | |
| 44 | export const GetUser = Binding.Service<GetUser>("GCP.AlloyDB.GetUser"); |