1import type * as mediatailor from "@distilled.cloud/aws/mediatailor";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { PlaybackConfiguration } from "./PlaybackConfiguration.ts";
5
6/**
7 * `GetPrefetchSchedule` request with `PlaybackConfigurationName` injected
8 * from the bound {@link PlaybackConfiguration}.
9 */
10export interface GetPrefetchScheduleRequest extends Omit<
11 mediatailor.GetPrefetchScheduleRequest,
12 "PlaybackConfigurationName"
13> {}
14
15/**
16 * Runtime binding for `mediatailor:GetPrefetchSchedule` — read a prefetch
17 * schedule on the bound {@link PlaybackConfiguration} by name.
18 *
19 * Provide the implementation with
20 * `Effect.provide(AWS.MediaTailor.GetPrefetchScheduleHttp)`.
21 *
22 * ### Prefetching Ads
23 * **Example:** Read a prefetch schedule
24 * ```typescript
25 * const getPrefetchSchedule = yield* AWS.MediaTailor.GetPrefetchSchedule(config);
26 *
27 * const schedule = yield* getPrefetchSchedule({ Name: `event-${eventId}` });
28 * ```
29 *
30 * @binding
31 */
32export interface GetPrefetchSchedule extends Binding.Service<
33 GetPrefetchSchedule,
34 "AWS.MediaTailor.GetPrefetchSchedule",
35 (
36 config: PlaybackConfiguration,
37 ) => Effect.Effect<
38 (
39 request: GetPrefetchScheduleRequest,
40 ) => Effect.Effect<
41 mediatailor.GetPrefetchScheduleResponse,
42 mediatailor.GetPrefetchScheduleError
43 >
44 >
45> {}
46export const GetPrefetchSchedule = Binding.Service<GetPrefetchSchedule>(
47 "AWS.MediaTailor.GetPrefetchSchedule",
48);