| 1 | import type * as mediatailor from "@distilled.cloud/aws/mediatailor"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { PlaybackConfiguration } from "./PlaybackConfiguration.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `ListPrefetchSchedules` request with `PlaybackConfigurationName` injected |
| 8 | * from the bound {@link PlaybackConfiguration}. |
| 9 | */ |
| 10 | export interface ListPrefetchSchedulesRequest extends Omit< |
| 11 | mediatailor.ListPrefetchSchedulesRequest, |
| 12 | "PlaybackConfigurationName" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for `mediatailor:ListPrefetchSchedules` — page through the |
| 17 | * prefetch schedules on the bound {@link PlaybackConfiguration}, optionally |
| 18 | * filtered by `StreamId` or `ScheduleType`. |
| 19 | * |
| 20 | * Provide the implementation with |
| 21 | * `Effect.provide(AWS.MediaTailor.ListPrefetchSchedulesHttp)`. |
| 22 | * |
| 23 | * ### Prefetching Ads |
| 24 | * **Example:** List prefetch schedules for a stream |
| 25 | * ```typescript |
| 26 | * const listPrefetchSchedules = yield* AWS.MediaTailor.ListPrefetchSchedules(config); |
| 27 | * |
| 28 | * const { Items } = yield* listPrefetchSchedules({ StreamId: streamId }); |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface ListPrefetchSchedules extends Binding.Service< |
| 34 | ListPrefetchSchedules, |
| 35 | "AWS.MediaTailor.ListPrefetchSchedules", |
| 36 | ( |
| 37 | config: PlaybackConfiguration, |
| 38 | ) => Effect.Effect< |
| 39 | ( |
| 40 | request: ListPrefetchSchedulesRequest, |
| 41 | ) => Effect.Effect< |
| 42 | mediatailor.ListPrefetchSchedulesResponse, |
| 43 | mediatailor.ListPrefetchSchedulesError |
| 44 | > |
| 45 | > |
| 46 | > {} |
| 47 | export const ListPrefetchSchedules = Binding.Service<ListPrefetchSchedules>( |
| 48 | "AWS.MediaTailor.ListPrefetchSchedules", |
| 49 | ); |