{-# 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.DescribeProgram
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes a program within a channel. For information about programs,
-- see
-- <https://docs.aws.amazon.com/mediatailor/latest/ug/channel-assembly-programs.html Working with programs>
-- in the /MediaTailor User Guide/.
module Amazonka.MediaTailor.DescribeProgram
  ( -- * Creating a Request
    DescribeProgram (..),
    newDescribeProgram,

    -- * Request Lenses
    describeProgram_channelName,
    describeProgram_programName,

    -- * Destructuring the Response
    DescribeProgramResponse (..),
    newDescribeProgramResponse,

    -- * Response Lenses
    describeProgramResponse_adBreaks,
    describeProgramResponse_arn,
    describeProgramResponse_channelName,
    describeProgramResponse_creationTime,
    describeProgramResponse_liveSourceName,
    describeProgramResponse_programName,
    describeProgramResponse_scheduledStartTime,
    describeProgramResponse_sourceLocationName,
    describeProgramResponse_vodSourceName,
    describeProgramResponse_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:/ 'newDescribeProgram' smart constructor.
data DescribeProgram = DescribeProgram'
  { -- | The name of the channel associated with this Program.
    DescribeProgram -> Text
channelName :: Prelude.Text,
    -- | The name of the program.
    DescribeProgram -> Text
programName :: Prelude.Text
  }
  deriving (DescribeProgram -> DescribeProgram -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProgram -> DescribeProgram -> Bool
$c/= :: DescribeProgram -> DescribeProgram -> Bool
== :: DescribeProgram -> DescribeProgram -> Bool
$c== :: DescribeProgram -> DescribeProgram -> Bool
Prelude.Eq, ReadPrec [DescribeProgram]
ReadPrec DescribeProgram
Int -> ReadS DescribeProgram
ReadS [DescribeProgram]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProgram]
$creadListPrec :: ReadPrec [DescribeProgram]
readPrec :: ReadPrec DescribeProgram
$creadPrec :: ReadPrec DescribeProgram
readList :: ReadS [DescribeProgram]
$creadList :: ReadS [DescribeProgram]
readsPrec :: Int -> ReadS DescribeProgram
$creadsPrec :: Int -> ReadS DescribeProgram
Prelude.Read, Int -> DescribeProgram -> ShowS
[DescribeProgram] -> ShowS
DescribeProgram -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProgram] -> ShowS
$cshowList :: [DescribeProgram] -> ShowS
show :: DescribeProgram -> String
$cshow :: DescribeProgram -> String
showsPrec :: Int -> DescribeProgram -> ShowS
$cshowsPrec :: Int -> DescribeProgram -> ShowS
Prelude.Show, forall x. Rep DescribeProgram x -> DescribeProgram
forall x. DescribeProgram -> Rep DescribeProgram x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeProgram x -> DescribeProgram
$cfrom :: forall x. DescribeProgram -> Rep DescribeProgram x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProgram' 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:
--
-- 'channelName', 'describeProgram_channelName' - The name of the channel associated with this Program.
--
-- 'programName', 'describeProgram_programName' - The name of the program.
newDescribeProgram ::
  -- | 'channelName'
  Prelude.Text ->
  -- | 'programName'
  Prelude.Text ->
  DescribeProgram
newDescribeProgram :: Text -> Text -> DescribeProgram
newDescribeProgram Text
pChannelName_ Text
pProgramName_ =
  DescribeProgram'
    { $sel:channelName:DescribeProgram' :: Text
channelName = Text
pChannelName_,
      $sel:programName:DescribeProgram' :: Text
programName = Text
pProgramName_
    }

-- | The name of the channel associated with this Program.
describeProgram_channelName :: Lens.Lens' DescribeProgram Prelude.Text
describeProgram_channelName :: Lens' DescribeProgram Text
describeProgram_channelName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProgram' {Text
channelName :: Text
$sel:channelName:DescribeProgram' :: DescribeProgram -> Text
channelName} -> Text
channelName) (\s :: DescribeProgram
s@DescribeProgram' {} Text
a -> DescribeProgram
s {$sel:channelName:DescribeProgram' :: Text
channelName = Text
a} :: DescribeProgram)

-- | The name of the program.
describeProgram_programName :: Lens.Lens' DescribeProgram Prelude.Text
describeProgram_programName :: Lens' DescribeProgram Text
describeProgram_programName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProgram' {Text
programName :: Text
$sel:programName:DescribeProgram' :: DescribeProgram -> Text
programName} -> Text
programName) (\s :: DescribeProgram
s@DescribeProgram' {} Text
a -> DescribeProgram
s {$sel:programName:DescribeProgram' :: Text
programName = Text
a} :: DescribeProgram)

instance Core.AWSRequest DescribeProgram where
  type
    AWSResponse DescribeProgram =
      DescribeProgramResponse
  request :: (Service -> Service) -> DescribeProgram -> Request DescribeProgram
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 DescribeProgram
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeProgram)))
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 [AdBreak]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeProgramResponse
DescribeProgramResponse'
            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
"AdBreaks" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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
"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
"ChannelName")
            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
"CreationTime")
            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
"LiveSourceName")
            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
"ProgramName")
            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
"ScheduledStartTime")
            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
"SourceLocationName")
            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
"VodSourceName")
            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 DescribeProgram where
  hashWithSalt :: Int -> DescribeProgram -> Int
hashWithSalt Int
_salt DescribeProgram' {Text
programName :: Text
channelName :: Text
$sel:programName:DescribeProgram' :: DescribeProgram -> Text
$sel:channelName:DescribeProgram' :: DescribeProgram -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
channelName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
programName

instance Prelude.NFData DescribeProgram where
  rnf :: DescribeProgram -> ()
rnf DescribeProgram' {Text
programName :: Text
channelName :: Text
$sel:programName:DescribeProgram' :: DescribeProgram -> Text
$sel:channelName:DescribeProgram' :: DescribeProgram -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
channelName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
programName

instance Data.ToHeaders DescribeProgram where
  toHeaders :: DescribeProgram -> 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 DescribeProgram where
  toPath :: DescribeProgram -> ByteString
toPath DescribeProgram' {Text
programName :: Text
channelName :: Text
$sel:programName:DescribeProgram' :: DescribeProgram -> Text
$sel:channelName:DescribeProgram' :: DescribeProgram -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/channel/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
channelName,
        ByteString
"/program/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
programName
      ]

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

-- | /See:/ 'newDescribeProgramResponse' smart constructor.
data DescribeProgramResponse = DescribeProgramResponse'
  { -- | The ad break configuration settings.
    DescribeProgramResponse -> Maybe [AdBreak]
adBreaks :: Prelude.Maybe [AdBreak],
    -- | The ARN of the program.
    DescribeProgramResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The name of the channel that the program belongs to.
    DescribeProgramResponse -> Maybe Text
channelName :: Prelude.Maybe Prelude.Text,
    -- | The timestamp of when the program was created.
    DescribeProgramResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
    -- | The name of the LiveSource for this Program.
    DescribeProgramResponse -> Maybe Text
liveSourceName :: Prelude.Maybe Prelude.Text,
    -- | The name of the program.
    DescribeProgramResponse -> Maybe Text
programName :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the program is scheduled to start in ISO 8601
    -- format and Coordinated Universal Time (UTC). For example, the value
    -- 2021-03-27T17:48:16.751Z represents March 27, 2021 at 17:48:16.751 UTC.
    DescribeProgramResponse -> Maybe POSIX
scheduledStartTime :: Prelude.Maybe Data.POSIX,
    -- | The source location name.
    DescribeProgramResponse -> Maybe Text
sourceLocationName :: Prelude.Maybe Prelude.Text,
    -- | The name that\'s used to refer to a VOD source.
    DescribeProgramResponse -> Maybe Text
vodSourceName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeProgramResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeProgramResponse -> DescribeProgramResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProgramResponse -> DescribeProgramResponse -> Bool
$c/= :: DescribeProgramResponse -> DescribeProgramResponse -> Bool
== :: DescribeProgramResponse -> DescribeProgramResponse -> Bool
$c== :: DescribeProgramResponse -> DescribeProgramResponse -> Bool
Prelude.Eq, ReadPrec [DescribeProgramResponse]
ReadPrec DescribeProgramResponse
Int -> ReadS DescribeProgramResponse
ReadS [DescribeProgramResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProgramResponse]
$creadListPrec :: ReadPrec [DescribeProgramResponse]
readPrec :: ReadPrec DescribeProgramResponse
$creadPrec :: ReadPrec DescribeProgramResponse
readList :: ReadS [DescribeProgramResponse]
$creadList :: ReadS [DescribeProgramResponse]
readsPrec :: Int -> ReadS DescribeProgramResponse
$creadsPrec :: Int -> ReadS DescribeProgramResponse
Prelude.Read, Int -> DescribeProgramResponse -> ShowS
[DescribeProgramResponse] -> ShowS
DescribeProgramResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProgramResponse] -> ShowS
$cshowList :: [DescribeProgramResponse] -> ShowS
show :: DescribeProgramResponse -> String
$cshow :: DescribeProgramResponse -> String
showsPrec :: Int -> DescribeProgramResponse -> ShowS
$cshowsPrec :: Int -> DescribeProgramResponse -> ShowS
Prelude.Show, forall x. Rep DescribeProgramResponse x -> DescribeProgramResponse
forall x. DescribeProgramResponse -> Rep DescribeProgramResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeProgramResponse x -> DescribeProgramResponse
$cfrom :: forall x. DescribeProgramResponse -> Rep DescribeProgramResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProgramResponse' 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:
--
-- 'adBreaks', 'describeProgramResponse_adBreaks' - The ad break configuration settings.
--
-- 'arn', 'describeProgramResponse_arn' - The ARN of the program.
--
-- 'channelName', 'describeProgramResponse_channelName' - The name of the channel that the program belongs to.
--
-- 'creationTime', 'describeProgramResponse_creationTime' - The timestamp of when the program was created.
--
-- 'liveSourceName', 'describeProgramResponse_liveSourceName' - The name of the LiveSource for this Program.
--
-- 'programName', 'describeProgramResponse_programName' - The name of the program.
--
-- 'scheduledStartTime', 'describeProgramResponse_scheduledStartTime' - The date and time that the program is scheduled to start in ISO 8601
-- format and Coordinated Universal Time (UTC). For example, the value
-- 2021-03-27T17:48:16.751Z represents March 27, 2021 at 17:48:16.751 UTC.
--
-- 'sourceLocationName', 'describeProgramResponse_sourceLocationName' - The source location name.
--
-- 'vodSourceName', 'describeProgramResponse_vodSourceName' - The name that\'s used to refer to a VOD source.
--
-- 'httpStatus', 'describeProgramResponse_httpStatus' - The response's http status code.
newDescribeProgramResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeProgramResponse
newDescribeProgramResponse :: Int -> DescribeProgramResponse
newDescribeProgramResponse Int
pHttpStatus_ =
  DescribeProgramResponse'
    { $sel:adBreaks:DescribeProgramResponse' :: Maybe [AdBreak]
adBreaks =
        forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeProgramResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:channelName:DescribeProgramResponse' :: Maybe Text
channelName = forall a. Maybe a
Prelude.Nothing,
      $sel:creationTime:DescribeProgramResponse' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:liveSourceName:DescribeProgramResponse' :: Maybe Text
liveSourceName = forall a. Maybe a
Prelude.Nothing,
      $sel:programName:DescribeProgramResponse' :: Maybe Text
programName = forall a. Maybe a
Prelude.Nothing,
      $sel:scheduledStartTime:DescribeProgramResponse' :: Maybe POSIX
scheduledStartTime = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceLocationName:DescribeProgramResponse' :: Maybe Text
sourceLocationName = forall a. Maybe a
Prelude.Nothing,
      $sel:vodSourceName:DescribeProgramResponse' :: Maybe Text
vodSourceName = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeProgramResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ad break configuration settings.
describeProgramResponse_adBreaks :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe [AdBreak])
describeProgramResponse_adBreaks :: Lens' DescribeProgramResponse (Maybe [AdBreak])
describeProgramResponse_adBreaks = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProgramResponse' {Maybe [AdBreak]
adBreaks :: Maybe [AdBreak]
$sel:adBreaks:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe [AdBreak]
adBreaks} -> Maybe [AdBreak]
adBreaks) (\s :: DescribeProgramResponse
s@DescribeProgramResponse' {} Maybe [AdBreak]
a -> DescribeProgramResponse
s {$sel:adBreaks:DescribeProgramResponse' :: Maybe [AdBreak]
adBreaks = Maybe [AdBreak]
a} :: DescribeProgramResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ARN of the program.
describeProgramResponse_arn :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.Text)
describeProgramResponse_arn :: Lens' DescribeProgramResponse (Maybe Text)
describeProgramResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProgramResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeProgramResponse
s@DescribeProgramResponse' {} Maybe Text
a -> DescribeProgramResponse
s {$sel:arn:DescribeProgramResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeProgramResponse)

-- | The name of the channel that the program belongs to.
describeProgramResponse_channelName :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.Text)
describeProgramResponse_channelName :: Lens' DescribeProgramResponse (Maybe Text)
describeProgramResponse_channelName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProgramResponse' {Maybe Text
channelName :: Maybe Text
$sel:channelName:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
channelName} -> Maybe Text
channelName) (\s :: DescribeProgramResponse
s@DescribeProgramResponse' {} Maybe Text
a -> DescribeProgramResponse
s {$sel:channelName:DescribeProgramResponse' :: Maybe Text
channelName = Maybe Text
a} :: DescribeProgramResponse)

-- | The timestamp of when the program was created.
describeProgramResponse_creationTime :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.UTCTime)
describeProgramResponse_creationTime :: Lens' DescribeProgramResponse (Maybe UTCTime)
describeProgramResponse_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProgramResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribeProgramResponse
s@DescribeProgramResponse' {} Maybe POSIX
a -> DescribeProgramResponse
s {$sel:creationTime:DescribeProgramResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DescribeProgramResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The name of the LiveSource for this Program.
describeProgramResponse_liveSourceName :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.Text)
describeProgramResponse_liveSourceName :: Lens' DescribeProgramResponse (Maybe Text)
describeProgramResponse_liveSourceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProgramResponse' {Maybe Text
liveSourceName :: Maybe Text
$sel:liveSourceName:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
liveSourceName} -> Maybe Text
liveSourceName) (\s :: DescribeProgramResponse
s@DescribeProgramResponse' {} Maybe Text
a -> DescribeProgramResponse
s {$sel:liveSourceName:DescribeProgramResponse' :: Maybe Text
liveSourceName = Maybe Text
a} :: DescribeProgramResponse)

-- | The name of the program.
describeProgramResponse_programName :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.Text)
describeProgramResponse_programName :: Lens' DescribeProgramResponse (Maybe Text)
describeProgramResponse_programName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProgramResponse' {Maybe Text
programName :: Maybe Text
$sel:programName:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
programName} -> Maybe Text
programName) (\s :: DescribeProgramResponse
s@DescribeProgramResponse' {} Maybe Text
a -> DescribeProgramResponse
s {$sel:programName:DescribeProgramResponse' :: Maybe Text
programName = Maybe Text
a} :: DescribeProgramResponse)

-- | The date and time that the program is scheduled to start in ISO 8601
-- format and Coordinated Universal Time (UTC). For example, the value
-- 2021-03-27T17:48:16.751Z represents March 27, 2021 at 17:48:16.751 UTC.
describeProgramResponse_scheduledStartTime :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.UTCTime)
describeProgramResponse_scheduledStartTime :: Lens' DescribeProgramResponse (Maybe UTCTime)
describeProgramResponse_scheduledStartTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProgramResponse' {Maybe POSIX
scheduledStartTime :: Maybe POSIX
$sel:scheduledStartTime:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe POSIX
scheduledStartTime} -> Maybe POSIX
scheduledStartTime) (\s :: DescribeProgramResponse
s@DescribeProgramResponse' {} Maybe POSIX
a -> DescribeProgramResponse
s {$sel:scheduledStartTime:DescribeProgramResponse' :: Maybe POSIX
scheduledStartTime = Maybe POSIX
a} :: DescribeProgramResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The source location name.
describeProgramResponse_sourceLocationName :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.Text)
describeProgramResponse_sourceLocationName :: Lens' DescribeProgramResponse (Maybe Text)
describeProgramResponse_sourceLocationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProgramResponse' {Maybe Text
sourceLocationName :: Maybe Text
$sel:sourceLocationName:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
sourceLocationName} -> Maybe Text
sourceLocationName) (\s :: DescribeProgramResponse
s@DescribeProgramResponse' {} Maybe Text
a -> DescribeProgramResponse
s {$sel:sourceLocationName:DescribeProgramResponse' :: Maybe Text
sourceLocationName = Maybe Text
a} :: DescribeProgramResponse)

-- | The name that\'s used to refer to a VOD source.
describeProgramResponse_vodSourceName :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.Text)
describeProgramResponse_vodSourceName :: Lens' DescribeProgramResponse (Maybe Text)
describeProgramResponse_vodSourceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProgramResponse' {Maybe Text
vodSourceName :: Maybe Text
$sel:vodSourceName:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
vodSourceName} -> Maybe Text
vodSourceName) (\s :: DescribeProgramResponse
s@DescribeProgramResponse' {} Maybe Text
a -> DescribeProgramResponse
s {$sel:vodSourceName:DescribeProgramResponse' :: Maybe Text
vodSourceName = Maybe Text
a} :: DescribeProgramResponse)

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

instance Prelude.NFData DescribeProgramResponse where
  rnf :: DescribeProgramResponse -> ()
rnf DescribeProgramResponse' {Int
Maybe [AdBreak]
Maybe Text
Maybe POSIX
httpStatus :: Int
vodSourceName :: Maybe Text
sourceLocationName :: Maybe Text
scheduledStartTime :: Maybe POSIX
programName :: Maybe Text
liveSourceName :: Maybe Text
creationTime :: Maybe POSIX
channelName :: Maybe Text
arn :: Maybe Text
adBreaks :: Maybe [AdBreak]
$sel:httpStatus:DescribeProgramResponse' :: DescribeProgramResponse -> Int
$sel:vodSourceName:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
$sel:sourceLocationName:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
$sel:scheduledStartTime:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe POSIX
$sel:programName:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
$sel:liveSourceName:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
$sel:creationTime:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe POSIX
$sel:channelName:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
$sel:arn:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe Text
$sel:adBreaks:DescribeProgramResponse' :: DescribeProgramResponse -> Maybe [AdBreak]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [AdBreak]
adBreaks
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
channelName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
liveSourceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
programName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
scheduledStartTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceLocationName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vodSourceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus