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

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

-- |
-- Module      : Amazonka.MediaLive.Types.PipelineDetail
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaLive.Types.PipelineDetail where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Runtime details of a pipeline when a channel is running.
--
-- /See:/ 'newPipelineDetail' smart constructor.
data PipelineDetail = PipelineDetail'
  { -- | The name of the active input attachment currently being ingested by this
    -- pipeline.
    PipelineDetail -> Maybe Text
activeInputAttachmentName :: Prelude.Maybe Prelude.Text,
    -- | The name of the input switch schedule action that occurred most recently
    -- and that resulted in the switch to the current input attachment for this
    -- pipeline.
    PipelineDetail -> Maybe Text
activeInputSwitchActionName :: Prelude.Maybe Prelude.Text,
    -- | The name of the motion graphics activate action that occurred most
    -- recently and that resulted in the current graphics URI for this
    -- pipeline.
    PipelineDetail -> Maybe Text
activeMotionGraphicsActionName :: Prelude.Maybe Prelude.Text,
    -- | The current URI being used for HTML5 motion graphics for this pipeline.
    PipelineDetail -> Maybe Text
activeMotionGraphicsUri :: Prelude.Maybe Prelude.Text,
    -- | Pipeline ID
    PipelineDetail -> Maybe Text
pipelineId :: Prelude.Maybe Prelude.Text
  }
  deriving (PipelineDetail -> PipelineDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineDetail -> PipelineDetail -> Bool
$c/= :: PipelineDetail -> PipelineDetail -> Bool
== :: PipelineDetail -> PipelineDetail -> Bool
$c== :: PipelineDetail -> PipelineDetail -> Bool
Prelude.Eq, ReadPrec [PipelineDetail]
ReadPrec PipelineDetail
Int -> ReadS PipelineDetail
ReadS [PipelineDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PipelineDetail]
$creadListPrec :: ReadPrec [PipelineDetail]
readPrec :: ReadPrec PipelineDetail
$creadPrec :: ReadPrec PipelineDetail
readList :: ReadS [PipelineDetail]
$creadList :: ReadS [PipelineDetail]
readsPrec :: Int -> ReadS PipelineDetail
$creadsPrec :: Int -> ReadS PipelineDetail
Prelude.Read, Int -> PipelineDetail -> ShowS
[PipelineDetail] -> ShowS
PipelineDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PipelineDetail] -> ShowS
$cshowList :: [PipelineDetail] -> ShowS
show :: PipelineDetail -> String
$cshow :: PipelineDetail -> String
showsPrec :: Int -> PipelineDetail -> ShowS
$cshowsPrec :: Int -> PipelineDetail -> ShowS
Prelude.Show, forall x. Rep PipelineDetail x -> PipelineDetail
forall x. PipelineDetail -> Rep PipelineDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PipelineDetail x -> PipelineDetail
$cfrom :: forall x. PipelineDetail -> Rep PipelineDetail x
Prelude.Generic)

-- |
-- Create a value of 'PipelineDetail' 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:
--
-- 'activeInputAttachmentName', 'pipelineDetail_activeInputAttachmentName' - The name of the active input attachment currently being ingested by this
-- pipeline.
--
-- 'activeInputSwitchActionName', 'pipelineDetail_activeInputSwitchActionName' - The name of the input switch schedule action that occurred most recently
-- and that resulted in the switch to the current input attachment for this
-- pipeline.
--
-- 'activeMotionGraphicsActionName', 'pipelineDetail_activeMotionGraphicsActionName' - The name of the motion graphics activate action that occurred most
-- recently and that resulted in the current graphics URI for this
-- pipeline.
--
-- 'activeMotionGraphicsUri', 'pipelineDetail_activeMotionGraphicsUri' - The current URI being used for HTML5 motion graphics for this pipeline.
--
-- 'pipelineId', 'pipelineDetail_pipelineId' - Pipeline ID
newPipelineDetail ::
  PipelineDetail
newPipelineDetail :: PipelineDetail
newPipelineDetail =
  PipelineDetail'
    { $sel:activeInputAttachmentName:PipelineDetail' :: Maybe Text
activeInputAttachmentName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:activeInputSwitchActionName:PipelineDetail' :: Maybe Text
activeInputSwitchActionName = forall a. Maybe a
Prelude.Nothing,
      $sel:activeMotionGraphicsActionName:PipelineDetail' :: Maybe Text
activeMotionGraphicsActionName = forall a. Maybe a
Prelude.Nothing,
      $sel:activeMotionGraphicsUri:PipelineDetail' :: Maybe Text
activeMotionGraphicsUri = forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineId:PipelineDetail' :: Maybe Text
pipelineId = forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the active input attachment currently being ingested by this
-- pipeline.
pipelineDetail_activeInputAttachmentName :: Lens.Lens' PipelineDetail (Prelude.Maybe Prelude.Text)
pipelineDetail_activeInputAttachmentName :: Lens' PipelineDetail (Maybe Text)
pipelineDetail_activeInputAttachmentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineDetail' {Maybe Text
activeInputAttachmentName :: Maybe Text
$sel:activeInputAttachmentName:PipelineDetail' :: PipelineDetail -> Maybe Text
activeInputAttachmentName} -> Maybe Text
activeInputAttachmentName) (\s :: PipelineDetail
s@PipelineDetail' {} Maybe Text
a -> PipelineDetail
s {$sel:activeInputAttachmentName:PipelineDetail' :: Maybe Text
activeInputAttachmentName = Maybe Text
a} :: PipelineDetail)

-- | The name of the input switch schedule action that occurred most recently
-- and that resulted in the switch to the current input attachment for this
-- pipeline.
pipelineDetail_activeInputSwitchActionName :: Lens.Lens' PipelineDetail (Prelude.Maybe Prelude.Text)
pipelineDetail_activeInputSwitchActionName :: Lens' PipelineDetail (Maybe Text)
pipelineDetail_activeInputSwitchActionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineDetail' {Maybe Text
activeInputSwitchActionName :: Maybe Text
$sel:activeInputSwitchActionName:PipelineDetail' :: PipelineDetail -> Maybe Text
activeInputSwitchActionName} -> Maybe Text
activeInputSwitchActionName) (\s :: PipelineDetail
s@PipelineDetail' {} Maybe Text
a -> PipelineDetail
s {$sel:activeInputSwitchActionName:PipelineDetail' :: Maybe Text
activeInputSwitchActionName = Maybe Text
a} :: PipelineDetail)

-- | The name of the motion graphics activate action that occurred most
-- recently and that resulted in the current graphics URI for this
-- pipeline.
pipelineDetail_activeMotionGraphicsActionName :: Lens.Lens' PipelineDetail (Prelude.Maybe Prelude.Text)
pipelineDetail_activeMotionGraphicsActionName :: Lens' PipelineDetail (Maybe Text)
pipelineDetail_activeMotionGraphicsActionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineDetail' {Maybe Text
activeMotionGraphicsActionName :: Maybe Text
$sel:activeMotionGraphicsActionName:PipelineDetail' :: PipelineDetail -> Maybe Text
activeMotionGraphicsActionName} -> Maybe Text
activeMotionGraphicsActionName) (\s :: PipelineDetail
s@PipelineDetail' {} Maybe Text
a -> PipelineDetail
s {$sel:activeMotionGraphicsActionName:PipelineDetail' :: Maybe Text
activeMotionGraphicsActionName = Maybe Text
a} :: PipelineDetail)

-- | The current URI being used for HTML5 motion graphics for this pipeline.
pipelineDetail_activeMotionGraphicsUri :: Lens.Lens' PipelineDetail (Prelude.Maybe Prelude.Text)
pipelineDetail_activeMotionGraphicsUri :: Lens' PipelineDetail (Maybe Text)
pipelineDetail_activeMotionGraphicsUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineDetail' {Maybe Text
activeMotionGraphicsUri :: Maybe Text
$sel:activeMotionGraphicsUri:PipelineDetail' :: PipelineDetail -> Maybe Text
activeMotionGraphicsUri} -> Maybe Text
activeMotionGraphicsUri) (\s :: PipelineDetail
s@PipelineDetail' {} Maybe Text
a -> PipelineDetail
s {$sel:activeMotionGraphicsUri:PipelineDetail' :: Maybe Text
activeMotionGraphicsUri = Maybe Text
a} :: PipelineDetail)

-- | Pipeline ID
pipelineDetail_pipelineId :: Lens.Lens' PipelineDetail (Prelude.Maybe Prelude.Text)
pipelineDetail_pipelineId :: Lens' PipelineDetail (Maybe Text)
pipelineDetail_pipelineId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineDetail' {Maybe Text
pipelineId :: Maybe Text
$sel:pipelineId:PipelineDetail' :: PipelineDetail -> Maybe Text
pipelineId} -> Maybe Text
pipelineId) (\s :: PipelineDetail
s@PipelineDetail' {} Maybe Text
a -> PipelineDetail
s {$sel:pipelineId:PipelineDetail' :: Maybe Text
pipelineId = Maybe Text
a} :: PipelineDetail)

instance Data.FromJSON PipelineDetail where
  parseJSON :: Value -> Parser PipelineDetail
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"PipelineDetail"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PipelineDetail
PipelineDetail'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"activeInputAttachmentName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"activeInputSwitchActionName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"activeMotionGraphicsActionName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"activeMotionGraphicsUri")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"pipelineId")
      )

instance Prelude.Hashable PipelineDetail where
  hashWithSalt :: Int -> PipelineDetail -> Int
hashWithSalt Int
_salt PipelineDetail' {Maybe Text
pipelineId :: Maybe Text
activeMotionGraphicsUri :: Maybe Text
activeMotionGraphicsActionName :: Maybe Text
activeInputSwitchActionName :: Maybe Text
activeInputAttachmentName :: Maybe Text
$sel:pipelineId:PipelineDetail' :: PipelineDetail -> Maybe Text
$sel:activeMotionGraphicsUri:PipelineDetail' :: PipelineDetail -> Maybe Text
$sel:activeMotionGraphicsActionName:PipelineDetail' :: PipelineDetail -> Maybe Text
$sel:activeInputSwitchActionName:PipelineDetail' :: PipelineDetail -> Maybe Text
$sel:activeInputAttachmentName:PipelineDetail' :: PipelineDetail -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
activeInputAttachmentName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
activeInputSwitchActionName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
activeMotionGraphicsActionName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
activeMotionGraphicsUri
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pipelineId

instance Prelude.NFData PipelineDetail where
  rnf :: PipelineDetail -> ()
rnf PipelineDetail' {Maybe Text
pipelineId :: Maybe Text
activeMotionGraphicsUri :: Maybe Text
activeMotionGraphicsActionName :: Maybe Text
activeInputSwitchActionName :: Maybe Text
activeInputAttachmentName :: Maybe Text
$sel:pipelineId:PipelineDetail' :: PipelineDetail -> Maybe Text
$sel:activeMotionGraphicsUri:PipelineDetail' :: PipelineDetail -> Maybe Text
$sel:activeMotionGraphicsActionName:PipelineDetail' :: PipelineDetail -> Maybe Text
$sel:activeInputSwitchActionName:PipelineDetail' :: PipelineDetail -> Maybe Text
$sel:activeInputAttachmentName:PipelineDetail' :: PipelineDetail -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
activeInputAttachmentName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
activeInputSwitchActionName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
activeMotionGraphicsActionName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
activeMotionGraphicsUri
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pipelineId