| 1 | import type * as containeranalysis from "@distilled.cloud/gcp/containeranalysis_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 { Occurrence } from "./Occurrence.ts"; |
| 6 | |
| 7 | export interface GetOccurrenceRequest extends Omit< |
| 8 | containeranalysis.GetProjectsOccurrencesRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Container Analysis `occurrences.get`. |
| 14 | * |
| 15 | * Bind this operation to an {@link Occurrence} in a Function/Action |
| 16 | * init phase. Provide {@link GetOccurrenceHttp}. |
| 17 | * |
| 18 | * ### Reading an Occurrence |
| 19 | * **Example:** Get the bound occurrence |
| 20 | * ```typescript |
| 21 | * const getOccurrence = yield* GCP.ContainerAnalysis.GetOccurrence( |
| 22 | * occurrence, |
| 23 | * ); |
| 24 | * const live = yield* getOccurrence(); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | * @category ContainerAnalysis |
| 29 | */ |
| 30 | export interface GetOccurrence extends Binding.Service< |
| 31 | GetOccurrence, |
| 32 | "GCP.ContainerAnalysis.GetOccurrence", |
| 33 | ( |
| 34 | occurrence: Occurrence, |
| 35 | ) => Effect.Effect< |
| 36 | ( |
| 37 | request?: GetOccurrenceRequest, |
| 38 | ) => Effect.Effect< |
| 39 | containeranalysis.Occurrence, |
| 40 | containeranalysis.GetProjectsOccurrencesError, |
| 41 | RuntimeContext |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | |
| 46 | export const GetOccurrence = Binding.Service<GetOccurrence>( |
| 47 | "GCP.ContainerAnalysis.GetOccurrence", |
| 48 | ); |