{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the properties of the requested program.
module Amazonka.MediaTailor.DescribeProgram
  ( -- * Creating a Request
    DescribeProgram (..),
    newDescribeProgram,

    -- * Request Lenses
    describeProgram_channelName,
    describeProgram_programName,

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

    -- * Response Lenses
    describeProgramResponse_creationTime,
    describeProgramResponse_sourceLocationName,
    describeProgramResponse_arn,
    describeProgramResponse_programName,
    describeProgramResponse_adBreaks,
    describeProgramResponse_channelName,
    describeProgramResponse_scheduledStartTime,
    describeProgramResponse_vodSourceName,
    describeProgramResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 identifier for the channel you are working on.
    DescribeProgram -> Text
channelName :: Prelude.Text,
    -- | The identifier for the program you are working on.
    DescribeProgram -> Text
programName :: Prelude.Text
  }
  deriving (DescribeProgram -> DescribeProgram -> Bool
(DescribeProgram -> DescribeProgram -> Bool)
-> (DescribeProgram -> DescribeProgram -> Bool)
-> Eq DescribeProgram
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]
(Int -> ReadS DescribeProgram)
-> ReadS [DescribeProgram]
-> ReadPrec DescribeProgram
-> ReadPrec [DescribeProgram]
-> Read 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
(Int -> DescribeProgram -> ShowS)
-> (DescribeProgram -> String)
-> ([DescribeProgram] -> ShowS)
-> Show DescribeProgram
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. DescribeProgram -> Rep DescribeProgram x)
-> (forall x. Rep DescribeProgram x -> DescribeProgram)
-> Generic DescribeProgram
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 identifier for the channel you are working on.
--
-- 'programName', 'describeProgram_programName' - The identifier for the program you are working on.
newDescribeProgram ::
  -- | 'channelName'
  Prelude.Text ->
  -- | 'programName'
  Prelude.Text ->
  DescribeProgram
newDescribeProgram :: Text -> Text -> DescribeProgram
newDescribeProgram Text
pChannelName_ Text
pProgramName_ =
  DescribeProgram' :: Text -> Text -> DescribeProgram
DescribeProgram'
    { $sel:channelName:DescribeProgram' :: Text
channelName = Text
pChannelName_,
      $sel:programName:DescribeProgram' :: Text
programName = Text
pProgramName_
    }

-- | The identifier for the channel you are working on.
describeProgram_channelName :: Lens.Lens' DescribeProgram Prelude.Text
describeProgram_channelName :: (Text -> f Text) -> DescribeProgram -> f DescribeProgram
describeProgram_channelName = (DescribeProgram -> Text)
-> (DescribeProgram -> Text -> DescribeProgram)
-> Lens DescribeProgram DescribeProgram Text Text
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 identifier for the program you are working on.
describeProgram_programName :: Lens.Lens' DescribeProgram Prelude.Text
describeProgram_programName :: (Text -> f Text) -> DescribeProgram -> f DescribeProgram
describeProgram_programName = (DescribeProgram -> Text)
-> (DescribeProgram -> Text -> DescribeProgram)
-> Lens DescribeProgram DescribeProgram Text Text
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 :: DescribeProgram -> Request DescribeProgram
request = Service -> DescribeProgram -> Request DescribeProgram
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeProgram
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeProgram)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeProgram))
-> Logger
-> Service
-> Proxy DescribeProgram
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeProgram)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> DescribeProgramResponse
DescribeProgramResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [AdBreak]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Int
 -> DescribeProgramResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [AdBreak]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeProgramResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [AdBreak]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeProgramResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [AdBreak]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SourceLocationName")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [AdBreak]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeProgramResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [AdBreak]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Arn")
            Either
  String
  (Maybe Text
   -> Maybe [AdBreak]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeProgramResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [AdBreak]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ProgramName")
            Either
  String
  (Maybe [AdBreak]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeProgramResponse)
-> Either String (Maybe [AdBreak])
-> Either
     String
     (Maybe Text
      -> Maybe POSIX -> Maybe Text -> Int -> DescribeProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [AdBreak]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AdBreaks" Either String (Maybe (Maybe [AdBreak]))
-> Maybe [AdBreak] -> Either String (Maybe [AdBreak])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AdBreak]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe POSIX -> Maybe Text -> Int -> DescribeProgramResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX -> Maybe Text -> Int -> DescribeProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ChannelName")
            Either
  String
  (Maybe POSIX -> Maybe Text -> Int -> DescribeProgramResponse)
-> Either String (Maybe POSIX)
-> Either String (Maybe Text -> Int -> DescribeProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ScheduledStartTime")
            Either String (Maybe Text -> Int -> DescribeProgramResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VodSourceName")
            Either String (Int -> DescribeProgramResponse)
-> Either String Int -> Either String DescribeProgramResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeProgram

instance Prelude.NFData DescribeProgram

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

instance Core.ToPath DescribeProgram where
  toPath :: DescribeProgram -> ByteString
toPath DescribeProgram' {Text
programName :: Text
channelName :: Text
$sel:programName:DescribeProgram' :: DescribeProgram -> Text
$sel:channelName:DescribeProgram' :: DescribeProgram -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/channel/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelName,
        ByteString
"/program/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
programName
      ]

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

-- | /See:/ 'newDescribeProgramResponse' smart constructor.
data DescribeProgramResponse = DescribeProgramResponse'
  { -- | The timestamp of when the program was created.
    DescribeProgramResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The source location name.
    DescribeProgramResponse -> Maybe Text
sourceLocationName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the program.
    DescribeProgramResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The name of the program.
    DescribeProgramResponse -> Maybe Text
programName :: Prelude.Maybe Prelude.Text,
    -- | The ad break configuration settings.
    DescribeProgramResponse -> Maybe [AdBreak]
adBreaks :: Prelude.Maybe [AdBreak],
    -- | The name of the channel that the program belongs to.
    DescribeProgramResponse -> Maybe Text
channelName :: 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 Core.POSIX,
    -- | 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
(DescribeProgramResponse -> DescribeProgramResponse -> Bool)
-> (DescribeProgramResponse -> DescribeProgramResponse -> Bool)
-> Eq DescribeProgramResponse
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]
(Int -> ReadS DescribeProgramResponse)
-> ReadS [DescribeProgramResponse]
-> ReadPrec DescribeProgramResponse
-> ReadPrec [DescribeProgramResponse]
-> Read 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
(Int -> DescribeProgramResponse -> ShowS)
-> (DescribeProgramResponse -> String)
-> ([DescribeProgramResponse] -> ShowS)
-> Show DescribeProgramResponse
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.
 DescribeProgramResponse -> Rep DescribeProgramResponse x)
-> (forall x.
    Rep DescribeProgramResponse x -> DescribeProgramResponse)
-> Generic DescribeProgramResponse
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:
--
-- 'creationTime', 'describeProgramResponse_creationTime' - The timestamp of when the program was created.
--
-- 'sourceLocationName', 'describeProgramResponse_sourceLocationName' - The source location name.
--
-- 'arn', 'describeProgramResponse_arn' - The ARN of the program.
--
-- 'programName', 'describeProgramResponse_programName' - The name of the program.
--
-- 'adBreaks', 'describeProgramResponse_adBreaks' - The ad break configuration settings.
--
-- 'channelName', 'describeProgramResponse_channelName' - The name of the channel that the program belongs to.
--
-- '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.
--
-- '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' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> DescribeProgramResponse
DescribeProgramResponse'
    { $sel:creationTime:DescribeProgramResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceLocationName:DescribeProgramResponse' :: Maybe Text
sourceLocationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeProgramResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:programName:DescribeProgramResponse' :: Maybe Text
programName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:adBreaks:DescribeProgramResponse' :: Maybe [AdBreak]
adBreaks = Maybe [AdBreak]
forall a. Maybe a
Prelude.Nothing,
      $sel:channelName:DescribeProgramResponse' :: Maybe Text
channelName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduledStartTime:DescribeProgramResponse' :: Maybe POSIX
scheduledStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:vodSourceName:DescribeProgramResponse' :: Maybe Text
vodSourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeProgramResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The timestamp of when the program was created.
describeProgramResponse_creationTime :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.UTCTime)
describeProgramResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeProgramResponse -> f DescribeProgramResponse
describeProgramResponse_creationTime = (DescribeProgramResponse -> Maybe POSIX)
-> (DescribeProgramResponse
    -> Maybe POSIX -> DescribeProgramResponse)
-> Lens
     DescribeProgramResponse
     DescribeProgramResponse
     (Maybe POSIX)
     (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeProgramResponse -> f DescribeProgramResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeProgramResponse
-> f DescribeProgramResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The source location name.
describeProgramResponse_sourceLocationName :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.Text)
describeProgramResponse_sourceLocationName :: (Maybe Text -> f (Maybe Text))
-> DescribeProgramResponse -> f DescribeProgramResponse
describeProgramResponse_sourceLocationName = (DescribeProgramResponse -> Maybe Text)
-> (DescribeProgramResponse
    -> Maybe Text -> DescribeProgramResponse)
-> Lens
     DescribeProgramResponse
     DescribeProgramResponse
     (Maybe Text)
     (Maybe Text)
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 ARN of the program.
describeProgramResponse_arn :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.Text)
describeProgramResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeProgramResponse -> f DescribeProgramResponse
describeProgramResponse_arn = (DescribeProgramResponse -> Maybe Text)
-> (DescribeProgramResponse
    -> Maybe Text -> DescribeProgramResponse)
-> Lens
     DescribeProgramResponse
     DescribeProgramResponse
     (Maybe Text)
     (Maybe Text)
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 program.
describeProgramResponse_programName :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.Text)
describeProgramResponse_programName :: (Maybe Text -> f (Maybe Text))
-> DescribeProgramResponse -> f DescribeProgramResponse
describeProgramResponse_programName = (DescribeProgramResponse -> Maybe Text)
-> (DescribeProgramResponse
    -> Maybe Text -> DescribeProgramResponse)
-> Lens
     DescribeProgramResponse
     DescribeProgramResponse
     (Maybe Text)
     (Maybe Text)
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 ad break configuration settings.
describeProgramResponse_adBreaks :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe [AdBreak])
describeProgramResponse_adBreaks :: (Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> DescribeProgramResponse -> f DescribeProgramResponse
describeProgramResponse_adBreaks = (DescribeProgramResponse -> Maybe [AdBreak])
-> (DescribeProgramResponse
    -> Maybe [AdBreak] -> DescribeProgramResponse)
-> Lens
     DescribeProgramResponse
     DescribeProgramResponse
     (Maybe [AdBreak])
     (Maybe [AdBreak])
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) ((Maybe [AdBreak] -> f (Maybe [AdBreak]))
 -> DescribeProgramResponse -> f DescribeProgramResponse)
-> ((Maybe [AdBreak] -> f (Maybe [AdBreak]))
    -> Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> (Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> DescribeProgramResponse
-> f DescribeProgramResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AdBreak] [AdBreak] [AdBreak] [AdBreak]
-> Iso
     (Maybe [AdBreak])
     (Maybe [AdBreak])
     (Maybe [AdBreak])
     (Maybe [AdBreak])
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 AnIso [AdBreak] [AdBreak] [AdBreak] [AdBreak]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the channel that the program belongs to.
describeProgramResponse_channelName :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.Text)
describeProgramResponse_channelName :: (Maybe Text -> f (Maybe Text))
-> DescribeProgramResponse -> f DescribeProgramResponse
describeProgramResponse_channelName = (DescribeProgramResponse -> Maybe Text)
-> (DescribeProgramResponse
    -> Maybe Text -> DescribeProgramResponse)
-> Lens
     DescribeProgramResponse
     DescribeProgramResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeProgramResponse -> f DescribeProgramResponse
describeProgramResponse_scheduledStartTime = (DescribeProgramResponse -> Maybe POSIX)
-> (DescribeProgramResponse
    -> Maybe POSIX -> DescribeProgramResponse)
-> Lens
     DescribeProgramResponse
     DescribeProgramResponse
     (Maybe POSIX)
     (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeProgramResponse -> f DescribeProgramResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeProgramResponse
-> f DescribeProgramResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name that\'s used to refer to a VOD source.
describeProgramResponse_vodSourceName :: Lens.Lens' DescribeProgramResponse (Prelude.Maybe Prelude.Text)
describeProgramResponse_vodSourceName :: (Maybe Text -> f (Maybe Text))
-> DescribeProgramResponse -> f DescribeProgramResponse
describeProgramResponse_vodSourceName = (DescribeProgramResponse -> Maybe Text)
-> (DescribeProgramResponse
    -> Maybe Text -> DescribeProgramResponse)
-> Lens
     DescribeProgramResponse
     DescribeProgramResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Int -> f Int)
-> DescribeProgramResponse -> f DescribeProgramResponse
describeProgramResponse_httpStatus = (DescribeProgramResponse -> Int)
-> (DescribeProgramResponse -> Int -> DescribeProgramResponse)
-> Lens DescribeProgramResponse DescribeProgramResponse Int Int
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