1import type * as location from "@distilled.cloud/aws/location";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { GeofenceCollection } from "./GeofenceCollection.ts";
5
6/**
7 * `GetGeofence` request with `CollectionName` injected from the bound
8 * resource.
9 */
10export interface GetGeofenceRequest extends Omit<
11 location.GetGeofenceRequest,
12 "CollectionName"
13> {}
14
15/**
16 * Retrieves a geofence's geometry and status from the collection.
17 *
18 * Runtime binding for the `GetGeofence` operation (IAM action
19 * `geo:GetGeofence`), scoped to one {@link GeofenceCollection}. Provide the implementation with
20 * `Effect.provide(AWS.Location.GetGeofenceHttp)`.
21 *
22 * ### Reading Geofences
23 * **Example:** Read a Geofence
24 * ```typescript
25 * const getGeofence = yield* Location.GetGeofence(collection);
26 *
27 * const fence = yield* getGeofence({ GeofenceId: "warehouse" });
28 * // fence.Status → "ACTIVE" once evaluable
29 * ```
30 *
31 * @binding
32 */
33export interface GetGeofence extends Binding.Service<
34 GetGeofence,
35 "AWS.Location.GetGeofence",
36 (
37 collection: GeofenceCollection,
38 ) => Effect.Effect<
39 (
40 request: GetGeofenceRequest,
41 ) => Effect.Effect<location.GetGeofenceResponse, location.GetGeofenceError>
42 >
43> {}
44export const GetGeofence = Binding.Service<GetGeofence>(
45 "AWS.Location.GetGeofence",
46);