{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaTailor.GetPrefetchSchedule
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves a prefetch schedule for a playback configuration. A prefetch
-- schedule allows you to tell MediaTailor to fetch and prepare certain ads
-- before an ad break happens. For more information about ad prefetching,
-- see
-- <https://docs.aws.amazon.com/mediatailor/latest/ug/prefetching-ads.html Using ad prefetching>
-- in the /MediaTailor User Guide/.
module Amazonka.MediaTailor.GetPrefetchSchedule
  ( -- * Creating a Request
    GetPrefetchSchedule (..),
    newGetPrefetchSchedule,

    -- * Request Lenses
    getPrefetchSchedule_name,
    getPrefetchSchedule_playbackConfigurationName,

    -- * Destructuring the Response
    GetPrefetchScheduleResponse (..),
    newGetPrefetchScheduleResponse,

    -- * Response Lenses
    getPrefetchScheduleResponse_arn,
    getPrefetchScheduleResponse_consumption,
    getPrefetchScheduleResponse_name,
    getPrefetchScheduleResponse_playbackConfigurationName,
    getPrefetchScheduleResponse_retrieval,
    getPrefetchScheduleResponse_streamId,
    getPrefetchScheduleResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaTailor.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetPrefetchSchedule' smart constructor.
data GetPrefetchSchedule = GetPrefetchSchedule'
  { -- | The name of the prefetch schedule. The name must be unique among all
    -- prefetch schedules that are associated with the specified playback
    -- configuration.
    GetPrefetchSchedule -> Text
name :: Prelude.Text,
    -- | Returns information about the prefetch schedule for a specific playback
    -- configuration. If you call @GetPrefetchSchedule@ on an expired prefetch
    -- schedule, MediaTailor returns an HTTP 404 status code.
    GetPrefetchSchedule -> Text
playbackConfigurationName :: Prelude.Text
  }
  deriving (GetPrefetchSchedule -> GetPrefetchSchedule -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPrefetchSchedule -> GetPrefetchSchedule -> Bool
$c/= :: GetPrefetchSchedule -> GetPrefetchSchedule -> Bool
== :: GetPrefetchSchedule -> GetPrefetchSchedule -> Bool
$c== :: GetPrefetchSchedule -> GetPrefetchSchedule -> Bool
Prelude.Eq, ReadPrec [GetPrefetchSchedule]
ReadPrec GetPrefetchSchedule
Int -> ReadS GetPrefetchSchedule
ReadS [GetPrefetchSchedule]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPrefetchSchedule]
$creadListPrec :: ReadPrec [GetPrefetchSchedule]
readPrec :: ReadPrec GetPrefetchSchedule
$creadPrec :: ReadPrec GetPrefetchSchedule
readList :: ReadS [GetPrefetchSchedule]
$creadList :: ReadS [GetPrefetchSchedule]
readsPrec :: Int -> ReadS GetPrefetchSchedule
$creadsPrec :: Int -> ReadS GetPrefetchSchedule
Prelude.Read, Int -> GetPrefetchSchedule -> ShowS
[GetPrefetchSchedule] -> ShowS
GetPrefetchSchedule -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPrefetchSchedule] -> ShowS
$cshowList :: [GetPrefetchSchedule] -> ShowS
show :: GetPrefetchSchedule -> String
$cshow :: GetPrefetchSchedule -> String
showsPrec :: Int -> GetPrefetchSchedule -> ShowS
$cshowsPrec :: Int -> GetPrefetchSchedule -> ShowS
Prelude.Show, forall x. Rep GetPrefetchSchedule x -> GetPrefetchSchedule
forall x. GetPrefetchSchedule -> Rep GetPrefetchSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetPrefetchSchedule x -> GetPrefetchSchedule
$cfrom :: forall x. GetPrefetchSchedule -> Rep GetPrefetchSchedule x
Prelude.Generic)

-- |
-- Create a value of 'GetPrefetchSchedule' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'name', 'getPrefetchSchedule_name' - The name of the prefetch schedule. The name must be unique among all
-- prefetch schedules that are associated with the specified playback
-- configuration.
--
-- 'playbackConfigurationName', 'getPrefetchSchedule_playbackConfigurationName' - Returns information about the prefetch schedule for a specific playback
-- configuration. If you call @GetPrefetchSchedule@ on an expired prefetch
-- schedule, MediaTailor returns an HTTP 404 status code.
newGetPrefetchSchedule ::
  -- | 'name'
  Prelude.Text ->
  -- | 'playbackConfigurationName'
  Prelude.Text ->
  GetPrefetchSchedule
newGetPrefetchSchedule :: Text -> Text -> GetPrefetchSchedule
newGetPrefetchSchedule
  Text
pName_
  Text
pPlaybackConfigurationName_ =
    GetPrefetchSchedule'
      { $sel:name:GetPrefetchSchedule' :: Text
name = Text
pName_,
        $sel:playbackConfigurationName:GetPrefetchSchedule' :: Text
playbackConfigurationName =
          Text
pPlaybackConfigurationName_
      }

-- | The name of the prefetch schedule. The name must be unique among all
-- prefetch schedules that are associated with the specified playback
-- configuration.
getPrefetchSchedule_name :: Lens.Lens' GetPrefetchSchedule Prelude.Text
getPrefetchSchedule_name :: Lens' GetPrefetchSchedule Text
getPrefetchSchedule_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPrefetchSchedule' {Text
name :: Text
$sel:name:GetPrefetchSchedule' :: GetPrefetchSchedule -> Text
name} -> Text
name) (\s :: GetPrefetchSchedule
s@GetPrefetchSchedule' {} Text
a -> GetPrefetchSchedule
s {$sel:name:GetPrefetchSchedule' :: Text
name = Text
a} :: GetPrefetchSchedule)

-- | Returns information about the prefetch schedule for a specific playback
-- configuration. If you call @GetPrefetchSchedule@ on an expired prefetch
-- schedule, MediaTailor returns an HTTP 404 status code.
getPrefetchSchedule_playbackConfigurationName :: Lens.Lens' GetPrefetchSchedule Prelude.Text
getPrefetchSchedule_playbackConfigurationName :: Lens' GetPrefetchSchedule Text
getPrefetchSchedule_playbackConfigurationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPrefetchSchedule' {Text
playbackConfigurationName :: Text
$sel:playbackConfigurationName:GetPrefetchSchedule' :: GetPrefetchSchedule -> Text
playbackConfigurationName} -> Text
playbackConfigurationName) (\s :: GetPrefetchSchedule
s@GetPrefetchSchedule' {} Text
a -> GetPrefetchSchedule
s {$sel:playbackConfigurationName:GetPrefetchSchedule' :: Text
playbackConfigurationName = Text
a} :: GetPrefetchSchedule)

instance Core.AWSRequest GetPrefetchSchedule where
  type
    AWSResponse GetPrefetchSchedule =
      GetPrefetchScheduleResponse
  request :: (Service -> Service)
-> GetPrefetchSchedule -> Request GetPrefetchSchedule
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetPrefetchSchedule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetPrefetchSchedule)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe PrefetchConsumption
-> Maybe Text
-> Maybe Text
-> Maybe PrefetchRetrieval
-> Maybe Text
-> Int
-> GetPrefetchScheduleResponse
GetPrefetchScheduleResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Consumption")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PlaybackConfigurationName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Retrieval")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"StreamId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetPrefetchSchedule where
  hashWithSalt :: Int -> GetPrefetchSchedule -> Int
hashWithSalt Int
_salt GetPrefetchSchedule' {Text
playbackConfigurationName :: Text
name :: Text
$sel:playbackConfigurationName:GetPrefetchSchedule' :: GetPrefetchSchedule -> Text
$sel:name:GetPrefetchSchedule' :: GetPrefetchSchedule -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
playbackConfigurationName

instance Prelude.NFData GetPrefetchSchedule where
  rnf :: GetPrefetchSchedule -> ()
rnf GetPrefetchSchedule' {Text
playbackConfigurationName :: Text
name :: Text
$sel:playbackConfigurationName:GetPrefetchSchedule' :: GetPrefetchSchedule -> Text
$sel:name:GetPrefetchSchedule' :: GetPrefetchSchedule -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
playbackConfigurationName

instance Data.ToHeaders GetPrefetchSchedule where
  toHeaders :: GetPrefetchSchedule -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath GetPrefetchSchedule where
  toPath :: GetPrefetchSchedule -> ByteString
toPath GetPrefetchSchedule' {Text
playbackConfigurationName :: Text
name :: Text
$sel:playbackConfigurationName:GetPrefetchSchedule' :: GetPrefetchSchedule -> Text
$sel:name:GetPrefetchSchedule' :: GetPrefetchSchedule -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/prefetchSchedule/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
playbackConfigurationName,
        ByteString
"/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
name
      ]

instance Data.ToQuery GetPrefetchSchedule where
  toQuery :: GetPrefetchSchedule -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetPrefetchScheduleResponse' smart constructor.
data GetPrefetchScheduleResponse = GetPrefetchScheduleResponse'
  { -- | The Amazon Resource Name (ARN) of the prefetch schedule.
    GetPrefetchScheduleResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Consumption settings determine how, and when, MediaTailor places the
    -- prefetched ads into ad breaks. Ad consumption occurs within a span of
    -- time that you define, called a /consumption window/. You can designate
    -- which ad breaks that MediaTailor fills with prefetch ads by setting
    -- avail matching criteria.
    GetPrefetchScheduleResponse -> Maybe PrefetchConsumption
consumption :: Prelude.Maybe PrefetchConsumption,
    -- | The name of the prefetch schedule. The name must be unique among all
    -- prefetch schedules that are associated with the specified playback
    -- configuration.
    GetPrefetchScheduleResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The name of the playback configuration to create the prefetch schedule
    -- for.
    GetPrefetchScheduleResponse -> Maybe Text
playbackConfigurationName :: Prelude.Maybe Prelude.Text,
    -- | A complex type that contains settings for prefetch retrieval from the ad
    -- decision server (ADS).
    GetPrefetchScheduleResponse -> Maybe PrefetchRetrieval
retrieval :: Prelude.Maybe PrefetchRetrieval,
    -- | An optional stream identifier that you can specify in order to prefetch
    -- for multiple streams that use the same playback configuration.
    GetPrefetchScheduleResponse -> Maybe Text
streamId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetPrefetchScheduleResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetPrefetchScheduleResponse -> GetPrefetchScheduleResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPrefetchScheduleResponse -> GetPrefetchScheduleResponse -> Bool
$c/= :: GetPrefetchScheduleResponse -> GetPrefetchScheduleResponse -> Bool
== :: GetPrefetchScheduleResponse -> GetPrefetchScheduleResponse -> Bool
$c== :: GetPrefetchScheduleResponse -> GetPrefetchScheduleResponse -> Bool
Prelude.Eq, ReadPrec [GetPrefetchScheduleResponse]
ReadPrec GetPrefetchScheduleResponse
Int -> ReadS GetPrefetchScheduleResponse
ReadS [GetPrefetchScheduleResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPrefetchScheduleResponse]
$creadListPrec :: ReadPrec [GetPrefetchScheduleResponse]
readPrec :: ReadPrec GetPrefetchScheduleResponse
$creadPrec :: ReadPrec GetPrefetchScheduleResponse
readList :: ReadS [GetPrefetchScheduleResponse]
$creadList :: ReadS [GetPrefetchScheduleResponse]
readsPrec :: Int -> ReadS GetPrefetchScheduleResponse
$creadsPrec :: Int -> ReadS GetPrefetchScheduleResponse
Prelude.Read, Int -> GetPrefetchScheduleResponse -> ShowS
[GetPrefetchScheduleResponse] -> ShowS
GetPrefetchScheduleResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPrefetchScheduleResponse] -> ShowS
$cshowList :: [GetPrefetchScheduleResponse] -> ShowS
show :: GetPrefetchScheduleResponse -> String
$cshow :: GetPrefetchScheduleResponse -> String
showsPrec :: Int -> GetPrefetchScheduleResponse -> ShowS
$cshowsPrec :: Int -> GetPrefetchScheduleResponse -> ShowS
Prelude.Show, forall x.
Rep GetPrefetchScheduleResponse x -> GetPrefetchScheduleResponse
forall x.
GetPrefetchScheduleResponse -> Rep GetPrefetchScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetPrefetchScheduleResponse x -> GetPrefetchScheduleResponse
$cfrom :: forall x.
GetPrefetchScheduleResponse -> Rep GetPrefetchScheduleResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetPrefetchScheduleResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'getPrefetchScheduleResponse_arn' - The Amazon Resource Name (ARN) of the prefetch schedule.
--
-- 'consumption', 'getPrefetchScheduleResponse_consumption' - Consumption settings determine how, and when, MediaTailor places the
-- prefetched ads into ad breaks. Ad consumption occurs within a span of
-- time that you define, called a /consumption window/. You can designate
-- which ad breaks that MediaTailor fills with prefetch ads by setting
-- avail matching criteria.
--
-- 'name', 'getPrefetchScheduleResponse_name' - The name of the prefetch schedule. The name must be unique among all
-- prefetch schedules that are associated with the specified playback
-- configuration.
--
-- 'playbackConfigurationName', 'getPrefetchScheduleResponse_playbackConfigurationName' - The name of the playback configuration to create the prefetch schedule
-- for.
--
-- 'retrieval', 'getPrefetchScheduleResponse_retrieval' - A complex type that contains settings for prefetch retrieval from the ad
-- decision server (ADS).
--
-- 'streamId', 'getPrefetchScheduleResponse_streamId' - An optional stream identifier that you can specify in order to prefetch
-- for multiple streams that use the same playback configuration.
--
-- 'httpStatus', 'getPrefetchScheduleResponse_httpStatus' - The response's http status code.
newGetPrefetchScheduleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetPrefetchScheduleResponse
newGetPrefetchScheduleResponse :: Int -> GetPrefetchScheduleResponse
newGetPrefetchScheduleResponse Int
pHttpStatus_ =
  GetPrefetchScheduleResponse'
    { $sel:arn:GetPrefetchScheduleResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:consumption:GetPrefetchScheduleResponse' :: Maybe PrefetchConsumption
consumption = forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetPrefetchScheduleResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:playbackConfigurationName:GetPrefetchScheduleResponse' :: Maybe Text
playbackConfigurationName = forall a. Maybe a
Prelude.Nothing,
      $sel:retrieval:GetPrefetchScheduleResponse' :: Maybe PrefetchRetrieval
retrieval = forall a. Maybe a
Prelude.Nothing,
      $sel:streamId:GetPrefetchScheduleResponse' :: Maybe Text
streamId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetPrefetchScheduleResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the prefetch schedule.
getPrefetchScheduleResponse_arn :: Lens.Lens' GetPrefetchScheduleResponse (Prelude.Maybe Prelude.Text)
getPrefetchScheduleResponse_arn :: Lens' GetPrefetchScheduleResponse (Maybe Text)
getPrefetchScheduleResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPrefetchScheduleResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GetPrefetchScheduleResponse
s@GetPrefetchScheduleResponse' {} Maybe Text
a -> GetPrefetchScheduleResponse
s {$sel:arn:GetPrefetchScheduleResponse' :: Maybe Text
arn = Maybe Text
a} :: GetPrefetchScheduleResponse)

-- | Consumption settings determine how, and when, MediaTailor places the
-- prefetched ads into ad breaks. Ad consumption occurs within a span of
-- time that you define, called a /consumption window/. You can designate
-- which ad breaks that MediaTailor fills with prefetch ads by setting
-- avail matching criteria.
getPrefetchScheduleResponse_consumption :: Lens.Lens' GetPrefetchScheduleResponse (Prelude.Maybe PrefetchConsumption)
getPrefetchScheduleResponse_consumption :: Lens' GetPrefetchScheduleResponse (Maybe PrefetchConsumption)
getPrefetchScheduleResponse_consumption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPrefetchScheduleResponse' {Maybe PrefetchConsumption
consumption :: Maybe PrefetchConsumption
$sel:consumption:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe PrefetchConsumption
consumption} -> Maybe PrefetchConsumption
consumption) (\s :: GetPrefetchScheduleResponse
s@GetPrefetchScheduleResponse' {} Maybe PrefetchConsumption
a -> GetPrefetchScheduleResponse
s {$sel:consumption:GetPrefetchScheduleResponse' :: Maybe PrefetchConsumption
consumption = Maybe PrefetchConsumption
a} :: GetPrefetchScheduleResponse)

-- | The name of the prefetch schedule. The name must be unique among all
-- prefetch schedules that are associated with the specified playback
-- configuration.
getPrefetchScheduleResponse_name :: Lens.Lens' GetPrefetchScheduleResponse (Prelude.Maybe Prelude.Text)
getPrefetchScheduleResponse_name :: Lens' GetPrefetchScheduleResponse (Maybe Text)
getPrefetchScheduleResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPrefetchScheduleResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetPrefetchScheduleResponse
s@GetPrefetchScheduleResponse' {} Maybe Text
a -> GetPrefetchScheduleResponse
s {$sel:name:GetPrefetchScheduleResponse' :: Maybe Text
name = Maybe Text
a} :: GetPrefetchScheduleResponse)

-- | The name of the playback configuration to create the prefetch schedule
-- for.
getPrefetchScheduleResponse_playbackConfigurationName :: Lens.Lens' GetPrefetchScheduleResponse (Prelude.Maybe Prelude.Text)
getPrefetchScheduleResponse_playbackConfigurationName :: Lens' GetPrefetchScheduleResponse (Maybe Text)
getPrefetchScheduleResponse_playbackConfigurationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPrefetchScheduleResponse' {Maybe Text
playbackConfigurationName :: Maybe Text
$sel:playbackConfigurationName:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe Text
playbackConfigurationName} -> Maybe Text
playbackConfigurationName) (\s :: GetPrefetchScheduleResponse
s@GetPrefetchScheduleResponse' {} Maybe Text
a -> GetPrefetchScheduleResponse
s {$sel:playbackConfigurationName:GetPrefetchScheduleResponse' :: Maybe Text
playbackConfigurationName = Maybe Text
a} :: GetPrefetchScheduleResponse)

-- | A complex type that contains settings for prefetch retrieval from the ad
-- decision server (ADS).
getPrefetchScheduleResponse_retrieval :: Lens.Lens' GetPrefetchScheduleResponse (Prelude.Maybe PrefetchRetrieval)
getPrefetchScheduleResponse_retrieval :: Lens' GetPrefetchScheduleResponse (Maybe PrefetchRetrieval)
getPrefetchScheduleResponse_retrieval = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPrefetchScheduleResponse' {Maybe PrefetchRetrieval
retrieval :: Maybe PrefetchRetrieval
$sel:retrieval:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe PrefetchRetrieval
retrieval} -> Maybe PrefetchRetrieval
retrieval) (\s :: GetPrefetchScheduleResponse
s@GetPrefetchScheduleResponse' {} Maybe PrefetchRetrieval
a -> GetPrefetchScheduleResponse
s {$sel:retrieval:GetPrefetchScheduleResponse' :: Maybe PrefetchRetrieval
retrieval = Maybe PrefetchRetrieval
a} :: GetPrefetchScheduleResponse)

-- | An optional stream identifier that you can specify in order to prefetch
-- for multiple streams that use the same playback configuration.
getPrefetchScheduleResponse_streamId :: Lens.Lens' GetPrefetchScheduleResponse (Prelude.Maybe Prelude.Text)
getPrefetchScheduleResponse_streamId :: Lens' GetPrefetchScheduleResponse (Maybe Text)
getPrefetchScheduleResponse_streamId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPrefetchScheduleResponse' {Maybe Text
streamId :: Maybe Text
$sel:streamId:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe Text
streamId} -> Maybe Text
streamId) (\s :: GetPrefetchScheduleResponse
s@GetPrefetchScheduleResponse' {} Maybe Text
a -> GetPrefetchScheduleResponse
s {$sel:streamId:GetPrefetchScheduleResponse' :: Maybe Text
streamId = Maybe Text
a} :: GetPrefetchScheduleResponse)

-- | The response's http status code.
getPrefetchScheduleResponse_httpStatus :: Lens.Lens' GetPrefetchScheduleResponse Prelude.Int
getPrefetchScheduleResponse_httpStatus :: Lens' GetPrefetchScheduleResponse Int
getPrefetchScheduleResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPrefetchScheduleResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetPrefetchScheduleResponse
s@GetPrefetchScheduleResponse' {} Int
a -> GetPrefetchScheduleResponse
s {$sel:httpStatus:GetPrefetchScheduleResponse' :: Int
httpStatus = Int
a} :: GetPrefetchScheduleResponse)

instance Prelude.NFData GetPrefetchScheduleResponse where
  rnf :: GetPrefetchScheduleResponse -> ()
rnf GetPrefetchScheduleResponse' {Int
Maybe Text
Maybe PrefetchConsumption
Maybe PrefetchRetrieval
httpStatus :: Int
streamId :: Maybe Text
retrieval :: Maybe PrefetchRetrieval
playbackConfigurationName :: Maybe Text
name :: Maybe Text
consumption :: Maybe PrefetchConsumption
arn :: Maybe Text
$sel:httpStatus:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Int
$sel:streamId:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe Text
$sel:retrieval:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe PrefetchRetrieval
$sel:playbackConfigurationName:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe Text
$sel:name:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe Text
$sel:consumption:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe PrefetchConsumption
$sel:arn:GetPrefetchScheduleResponse' :: GetPrefetchScheduleResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PrefetchConsumption
consumption
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
playbackConfigurationName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PrefetchRetrieval
retrieval
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus