{-# 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.MediaLive.DescribeInput
-- 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)
--
-- Produces details about an input
module Amazonka.MediaLive.DescribeInput
  ( -- * Creating a Request
    DescribeInput (..),
    newDescribeInput,

    -- * Request Lenses
    describeInput_inputId,

    -- * Destructuring the Response
    DescribeInputResponse (..),
    newDescribeInputResponse,

    -- * Response Lenses
    describeInputResponse_state,
    describeInputResponse_securityGroups,
    describeInputResponse_arn,
    describeInputResponse_inputDevices,
    describeInputResponse_inputPartnerIds,
    describeInputResponse_sources,
    describeInputResponse_destinations,
    describeInputResponse_name,
    describeInputResponse_attachedChannels,
    describeInputResponse_id,
    describeInputResponse_inputClass,
    describeInputResponse_type,
    describeInputResponse_mediaConnectFlows,
    describeInputResponse_inputSourceType,
    describeInputResponse_tags,
    describeInputResponse_roleArn,
    describeInputResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Placeholder documentation for DescribeInputRequest
--
-- /See:/ 'newDescribeInput' smart constructor.
data DescribeInput = DescribeInput'
  { -- | Unique ID of the input
    DescribeInput -> Text
inputId :: Prelude.Text
  }
  deriving (DescribeInput -> DescribeInput -> Bool
(DescribeInput -> DescribeInput -> Bool)
-> (DescribeInput -> DescribeInput -> Bool) -> Eq DescribeInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInput -> DescribeInput -> Bool
$c/= :: DescribeInput -> DescribeInput -> Bool
== :: DescribeInput -> DescribeInput -> Bool
$c== :: DescribeInput -> DescribeInput -> Bool
Prelude.Eq, ReadPrec [DescribeInput]
ReadPrec DescribeInput
Int -> ReadS DescribeInput
ReadS [DescribeInput]
(Int -> ReadS DescribeInput)
-> ReadS [DescribeInput]
-> ReadPrec DescribeInput
-> ReadPrec [DescribeInput]
-> Read DescribeInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInput]
$creadListPrec :: ReadPrec [DescribeInput]
readPrec :: ReadPrec DescribeInput
$creadPrec :: ReadPrec DescribeInput
readList :: ReadS [DescribeInput]
$creadList :: ReadS [DescribeInput]
readsPrec :: Int -> ReadS DescribeInput
$creadsPrec :: Int -> ReadS DescribeInput
Prelude.Read, Int -> DescribeInput -> ShowS
[DescribeInput] -> ShowS
DescribeInput -> String
(Int -> DescribeInput -> ShowS)
-> (DescribeInput -> String)
-> ([DescribeInput] -> ShowS)
-> Show DescribeInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInput] -> ShowS
$cshowList :: [DescribeInput] -> ShowS
show :: DescribeInput -> String
$cshow :: DescribeInput -> String
showsPrec :: Int -> DescribeInput -> ShowS
$cshowsPrec :: Int -> DescribeInput -> ShowS
Prelude.Show, (forall x. DescribeInput -> Rep DescribeInput x)
-> (forall x. Rep DescribeInput x -> DescribeInput)
-> Generic DescribeInput
forall x. Rep DescribeInput x -> DescribeInput
forall x. DescribeInput -> Rep DescribeInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeInput x -> DescribeInput
$cfrom :: forall x. DescribeInput -> Rep DescribeInput x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInput' 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:
--
-- 'inputId', 'describeInput_inputId' - Unique ID of the input
newDescribeInput ::
  -- | 'inputId'
  Prelude.Text ->
  DescribeInput
newDescribeInput :: Text -> DescribeInput
newDescribeInput Text
pInputId_ =
  DescribeInput' :: Text -> DescribeInput
DescribeInput' {$sel:inputId:DescribeInput' :: Text
inputId = Text
pInputId_}

-- | Unique ID of the input
describeInput_inputId :: Lens.Lens' DescribeInput Prelude.Text
describeInput_inputId :: (Text -> f Text) -> DescribeInput -> f DescribeInput
describeInput_inputId = (DescribeInput -> Text)
-> (DescribeInput -> Text -> DescribeInput)
-> Lens DescribeInput DescribeInput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInput' {Text
inputId :: Text
$sel:inputId:DescribeInput' :: DescribeInput -> Text
inputId} -> Text
inputId) (\s :: DescribeInput
s@DescribeInput' {} Text
a -> DescribeInput
s {$sel:inputId:DescribeInput' :: Text
inputId = Text
a} :: DescribeInput)

instance Core.AWSRequest DescribeInput where
  type
    AWSResponse DescribeInput =
      DescribeInputResponse
  request :: DescribeInput -> Request DescribeInput
request = Service -> DescribeInput -> Request DescribeInput
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeInput
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeInput)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeInput))
-> Logger
-> Service
-> Proxy DescribeInput
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeInput)))
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 InputState
-> Maybe [Text]
-> Maybe Text
-> Maybe [InputDeviceSettings]
-> Maybe [Text]
-> Maybe [InputSource]
-> Maybe [InputDestination]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe InputClass
-> Maybe InputType
-> Maybe [MediaConnectFlow]
-> Maybe InputSourceType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Int
-> DescribeInputResponse
DescribeInputResponse'
            (Maybe InputState
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe [InputDeviceSettings]
 -> Maybe [Text]
 -> Maybe [InputSource]
 -> Maybe [InputDestination]
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe InputClass
 -> Maybe InputType
 -> Maybe [MediaConnectFlow]
 -> Maybe InputSourceType
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Int
 -> DescribeInputResponse)
-> Either String (Maybe InputState)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe [InputDeviceSettings]
      -> Maybe [Text]
      -> Maybe [InputSource]
      -> Maybe [InputDestination]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe InputClass
      -> Maybe InputType
      -> Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe InputState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"state")
            Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe [InputDeviceSettings]
   -> Maybe [Text]
   -> Maybe [InputSource]
   -> Maybe [InputDestination]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe InputClass
   -> Maybe InputType
   -> Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe [InputDeviceSettings]
      -> Maybe [Text]
      -> Maybe [InputSource]
      -> Maybe [InputDestination]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe InputClass
      -> Maybe InputType
      -> Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"securityGroups" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe [InputDeviceSettings]
   -> Maybe [Text]
   -> Maybe [InputSource]
   -> Maybe [InputDestination]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe InputClass
   -> Maybe InputType
   -> Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [InputDeviceSettings]
      -> Maybe [Text]
      -> Maybe [InputSource]
      -> Maybe [InputDestination]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe InputClass
      -> Maybe InputType
      -> Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
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 [InputDeviceSettings]
   -> Maybe [Text]
   -> Maybe [InputSource]
   -> Maybe [InputDestination]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe InputClass
   -> Maybe InputType
   -> Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe [InputDeviceSettings])
-> Either
     String
     (Maybe [Text]
      -> Maybe [InputSource]
      -> Maybe [InputDestination]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe InputClass
      -> Maybe InputType
      -> Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe (Maybe [InputDeviceSettings]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"inputDevices" Either String (Maybe (Maybe [InputDeviceSettings]))
-> Maybe [InputDeviceSettings]
-> Either String (Maybe [InputDeviceSettings])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [InputDeviceSettings]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe [Text]
   -> Maybe [InputSource]
   -> Maybe [InputDestination]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe InputClass
   -> Maybe InputType
   -> Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe [InputSource]
      -> Maybe [InputDestination]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe InputClass
      -> Maybe InputType
      -> Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"inputPartnerIds"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe [InputSource]
   -> Maybe [InputDestination]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe InputClass
   -> Maybe InputType
   -> Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe [InputSource])
-> Either
     String
     (Maybe [InputDestination]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe InputClass
      -> Maybe InputType
      -> Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [InputSource]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"sources" Either String (Maybe (Maybe [InputSource]))
-> Maybe [InputSource] -> Either String (Maybe [InputSource])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [InputSource]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe [InputDestination]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe InputClass
   -> Maybe InputType
   -> Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe [InputDestination])
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe InputClass
      -> Maybe InputType
      -> Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [InputDestination]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"destinations" Either String (Maybe (Maybe [InputDestination]))
-> Maybe [InputDestination]
-> Either String (Maybe [InputDestination])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [InputDestination]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe InputClass
   -> Maybe InputType
   -> Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe InputClass
      -> Maybe InputType
      -> Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
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
"name")
            Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe InputClass
   -> Maybe InputType
   -> Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe InputClass
      -> Maybe InputType
      -> Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"attachedChannels"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe InputClass
   -> Maybe InputType
   -> Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe InputClass
      -> Maybe InputType
      -> Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
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
"id")
            Either
  String
  (Maybe InputClass
   -> Maybe InputType
   -> Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe InputClass)
-> Either
     String
     (Maybe InputType
      -> Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe InputClass)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"inputClass")
            Either
  String
  (Maybe InputType
   -> Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe InputType)
-> Either
     String
     (Maybe [MediaConnectFlow]
      -> Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe InputType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"type")
            Either
  String
  (Maybe [MediaConnectFlow]
   -> Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe [MediaConnectFlow])
-> Either
     String
     (Maybe InputSourceType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Int
      -> DescribeInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [MediaConnectFlow]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"mediaConnectFlows"
                            Either String (Maybe (Maybe [MediaConnectFlow]))
-> Maybe [MediaConnectFlow]
-> Either String (Maybe [MediaConnectFlow])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MediaConnectFlow]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe InputSourceType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Int
   -> DescribeInputResponse)
-> Either String (Maybe InputSourceType)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe Text -> Int -> DescribeInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe InputSourceType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"inputSourceType")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe Text -> Int -> DescribeInputResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Maybe Text -> Int -> DescribeInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> DescribeInputResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeInputResponse)
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
"roleArn")
            Either String (Int -> DescribeInputResponse)
-> Either String Int -> Either String DescribeInputResponse
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 DescribeInput

instance Prelude.NFData DescribeInput

instance Core.ToHeaders DescribeInput where
  toHeaders :: DescribeInput -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeInput -> 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 DescribeInput where
  toPath :: DescribeInput -> ByteString
toPath DescribeInput' {Text
inputId :: Text
$sel:inputId:DescribeInput' :: DescribeInput -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/prod/inputs/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
inputId]

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

-- | Placeholder documentation for DescribeInputResponse
--
-- /See:/ 'newDescribeInputResponse' smart constructor.
data DescribeInputResponse = DescribeInputResponse'
  { DescribeInputResponse -> Maybe InputState
state :: Prelude.Maybe InputState,
    -- | A list of IDs for all the Input Security Groups attached to the input.
    DescribeInputResponse -> Maybe [Text]
securityGroups :: Prelude.Maybe [Prelude.Text],
    -- | The Unique ARN of the input (generated, immutable).
    DescribeInputResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Settings for the input devices.
    DescribeInputResponse -> Maybe [InputDeviceSettings]
inputDevices :: Prelude.Maybe [InputDeviceSettings],
    -- | A list of IDs for all Inputs which are partners of this one.
    DescribeInputResponse -> Maybe [Text]
inputPartnerIds :: Prelude.Maybe [Prelude.Text],
    -- | A list of the sources of the input (PULL-type).
    DescribeInputResponse -> Maybe [InputSource]
sources :: Prelude.Maybe [InputSource],
    -- | A list of the destinations of the input (PUSH-type).
    DescribeInputResponse -> Maybe [InputDestination]
destinations :: Prelude.Maybe [InputDestination],
    -- | The user-assigned name (This is a mutable value).
    DescribeInputResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A list of channel IDs that that input is attached to (currently an input
    -- can only be attached to one channel).
    DescribeInputResponse -> Maybe [Text]
attachedChannels :: Prelude.Maybe [Prelude.Text],
    -- | The generated ID of the input (unique for user account, immutable).
    DescribeInputResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | STANDARD - MediaLive expects two sources to be connected to this input.
    -- If the channel is also STANDARD, both sources will be ingested. If the
    -- channel is SINGLE_PIPELINE, only the first source will be ingested; the
    -- second source will always be ignored, even if the first source fails.
    -- SINGLE_PIPELINE - You can connect only one source to this input. If the
    -- ChannelClass is also SINGLE_PIPELINE, this value is valid. If the
    -- ChannelClass is STANDARD, this value is not valid because the channel
    -- requires two sources in the input.
    DescribeInputResponse -> Maybe InputClass
inputClass :: Prelude.Maybe InputClass,
    DescribeInputResponse -> Maybe InputType
type' :: Prelude.Maybe InputType,
    -- | A list of MediaConnect Flows for this input.
    DescribeInputResponse -> Maybe [MediaConnectFlow]
mediaConnectFlows :: Prelude.Maybe [MediaConnectFlow],
    -- | Certain pull input sources can be dynamic, meaning that they can have
    -- their URL\'s dynamically changes during input switch actions. Presently,
    -- this functionality only works with MP4_FILE and TS_FILE inputs.
    DescribeInputResponse -> Maybe InputSourceType
inputSourceType :: Prelude.Maybe InputSourceType,
    -- | A collection of key-value pairs.
    DescribeInputResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Amazon Resource Name (ARN) of the role this input assumes during and
    -- after creation.
    DescribeInputResponse -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeInputResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeInputResponse -> DescribeInputResponse -> Bool
(DescribeInputResponse -> DescribeInputResponse -> Bool)
-> (DescribeInputResponse -> DescribeInputResponse -> Bool)
-> Eq DescribeInputResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInputResponse -> DescribeInputResponse -> Bool
$c/= :: DescribeInputResponse -> DescribeInputResponse -> Bool
== :: DescribeInputResponse -> DescribeInputResponse -> Bool
$c== :: DescribeInputResponse -> DescribeInputResponse -> Bool
Prelude.Eq, ReadPrec [DescribeInputResponse]
ReadPrec DescribeInputResponse
Int -> ReadS DescribeInputResponse
ReadS [DescribeInputResponse]
(Int -> ReadS DescribeInputResponse)
-> ReadS [DescribeInputResponse]
-> ReadPrec DescribeInputResponse
-> ReadPrec [DescribeInputResponse]
-> Read DescribeInputResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInputResponse]
$creadListPrec :: ReadPrec [DescribeInputResponse]
readPrec :: ReadPrec DescribeInputResponse
$creadPrec :: ReadPrec DescribeInputResponse
readList :: ReadS [DescribeInputResponse]
$creadList :: ReadS [DescribeInputResponse]
readsPrec :: Int -> ReadS DescribeInputResponse
$creadsPrec :: Int -> ReadS DescribeInputResponse
Prelude.Read, Int -> DescribeInputResponse -> ShowS
[DescribeInputResponse] -> ShowS
DescribeInputResponse -> String
(Int -> DescribeInputResponse -> ShowS)
-> (DescribeInputResponse -> String)
-> ([DescribeInputResponse] -> ShowS)
-> Show DescribeInputResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInputResponse] -> ShowS
$cshowList :: [DescribeInputResponse] -> ShowS
show :: DescribeInputResponse -> String
$cshow :: DescribeInputResponse -> String
showsPrec :: Int -> DescribeInputResponse -> ShowS
$cshowsPrec :: Int -> DescribeInputResponse -> ShowS
Prelude.Show, (forall x. DescribeInputResponse -> Rep DescribeInputResponse x)
-> (forall x. Rep DescribeInputResponse x -> DescribeInputResponse)
-> Generic DescribeInputResponse
forall x. Rep DescribeInputResponse x -> DescribeInputResponse
forall x. DescribeInputResponse -> Rep DescribeInputResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeInputResponse x -> DescribeInputResponse
$cfrom :: forall x. DescribeInputResponse -> Rep DescribeInputResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInputResponse' 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:
--
-- 'state', 'describeInputResponse_state' - Undocumented member.
--
-- 'securityGroups', 'describeInputResponse_securityGroups' - A list of IDs for all the Input Security Groups attached to the input.
--
-- 'arn', 'describeInputResponse_arn' - The Unique ARN of the input (generated, immutable).
--
-- 'inputDevices', 'describeInputResponse_inputDevices' - Settings for the input devices.
--
-- 'inputPartnerIds', 'describeInputResponse_inputPartnerIds' - A list of IDs for all Inputs which are partners of this one.
--
-- 'sources', 'describeInputResponse_sources' - A list of the sources of the input (PULL-type).
--
-- 'destinations', 'describeInputResponse_destinations' - A list of the destinations of the input (PUSH-type).
--
-- 'name', 'describeInputResponse_name' - The user-assigned name (This is a mutable value).
--
-- 'attachedChannels', 'describeInputResponse_attachedChannels' - A list of channel IDs that that input is attached to (currently an input
-- can only be attached to one channel).
--
-- 'id', 'describeInputResponse_id' - The generated ID of the input (unique for user account, immutable).
--
-- 'inputClass', 'describeInputResponse_inputClass' - STANDARD - MediaLive expects two sources to be connected to this input.
-- If the channel is also STANDARD, both sources will be ingested. If the
-- channel is SINGLE_PIPELINE, only the first source will be ingested; the
-- second source will always be ignored, even if the first source fails.
-- SINGLE_PIPELINE - You can connect only one source to this input. If the
-- ChannelClass is also SINGLE_PIPELINE, this value is valid. If the
-- ChannelClass is STANDARD, this value is not valid because the channel
-- requires two sources in the input.
--
-- 'type'', 'describeInputResponse_type' - Undocumented member.
--
-- 'mediaConnectFlows', 'describeInputResponse_mediaConnectFlows' - A list of MediaConnect Flows for this input.
--
-- 'inputSourceType', 'describeInputResponse_inputSourceType' - Certain pull input sources can be dynamic, meaning that they can have
-- their URL\'s dynamically changes during input switch actions. Presently,
-- this functionality only works with MP4_FILE and TS_FILE inputs.
--
-- 'tags', 'describeInputResponse_tags' - A collection of key-value pairs.
--
-- 'roleArn', 'describeInputResponse_roleArn' - The Amazon Resource Name (ARN) of the role this input assumes during and
-- after creation.
--
-- 'httpStatus', 'describeInputResponse_httpStatus' - The response's http status code.
newDescribeInputResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeInputResponse
newDescribeInputResponse :: Int -> DescribeInputResponse
newDescribeInputResponse Int
pHttpStatus_ =
  DescribeInputResponse' :: Maybe InputState
-> Maybe [Text]
-> Maybe Text
-> Maybe [InputDeviceSettings]
-> Maybe [Text]
-> Maybe [InputSource]
-> Maybe [InputDestination]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe InputClass
-> Maybe InputType
-> Maybe [MediaConnectFlow]
-> Maybe InputSourceType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Int
-> DescribeInputResponse
DescribeInputResponse'
    { $sel:state:DescribeInputResponse' :: Maybe InputState
state = Maybe InputState
forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroups:DescribeInputResponse' :: Maybe [Text]
securityGroups = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeInputResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputDevices:DescribeInputResponse' :: Maybe [InputDeviceSettings]
inputDevices = Maybe [InputDeviceSettings]
forall a. Maybe a
Prelude.Nothing,
      $sel:inputPartnerIds:DescribeInputResponse' :: Maybe [Text]
inputPartnerIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:sources:DescribeInputResponse' :: Maybe [InputSource]
sources = Maybe [InputSource]
forall a. Maybe a
Prelude.Nothing,
      $sel:destinations:DescribeInputResponse' :: Maybe [InputDestination]
destinations = Maybe [InputDestination]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeInputResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:attachedChannels:DescribeInputResponse' :: Maybe [Text]
attachedChannels = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:id:DescribeInputResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputClass:DescribeInputResponse' :: Maybe InputClass
inputClass = Maybe InputClass
forall a. Maybe a
Prelude.Nothing,
      $sel:type':DescribeInputResponse' :: Maybe InputType
type' = Maybe InputType
forall a. Maybe a
Prelude.Nothing,
      $sel:mediaConnectFlows:DescribeInputResponse' :: Maybe [MediaConnectFlow]
mediaConnectFlows = Maybe [MediaConnectFlow]
forall a. Maybe a
Prelude.Nothing,
      $sel:inputSourceType:DescribeInputResponse' :: Maybe InputSourceType
inputSourceType = Maybe InputSourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeInputResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:DescribeInputResponse' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeInputResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
describeInputResponse_state :: Lens.Lens' DescribeInputResponse (Prelude.Maybe InputState)
describeInputResponse_state :: (Maybe InputState -> f (Maybe InputState))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_state = (DescribeInputResponse -> Maybe InputState)
-> (DescribeInputResponse
    -> Maybe InputState -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe InputState)
     (Maybe InputState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe InputState
state :: Maybe InputState
$sel:state:DescribeInputResponse' :: DescribeInputResponse -> Maybe InputState
state} -> Maybe InputState
state) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe InputState
a -> DescribeInputResponse
s {$sel:state:DescribeInputResponse' :: Maybe InputState
state = Maybe InputState
a} :: DescribeInputResponse)

-- | A list of IDs for all the Input Security Groups attached to the input.
describeInputResponse_securityGroups :: Lens.Lens' DescribeInputResponse (Prelude.Maybe [Prelude.Text])
describeInputResponse_securityGroups :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_securityGroups = (DescribeInputResponse -> Maybe [Text])
-> (DescribeInputResponse -> Maybe [Text] -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe [Text]
securityGroups :: Maybe [Text]
$sel:securityGroups:DescribeInputResponse' :: DescribeInputResponse -> Maybe [Text]
securityGroups} -> Maybe [Text]
securityGroups) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe [Text]
a -> DescribeInputResponse
s {$sel:securityGroups:DescribeInputResponse' :: Maybe [Text]
securityGroups = Maybe [Text]
a} :: DescribeInputResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Unique ARN of the input (generated, immutable).
describeInputResponse_arn :: Lens.Lens' DescribeInputResponse (Prelude.Maybe Prelude.Text)
describeInputResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_arn = (DescribeInputResponse -> Maybe Text)
-> (DescribeInputResponse -> Maybe Text -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeInputResponse' :: DescribeInputResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe Text
a -> DescribeInputResponse
s {$sel:arn:DescribeInputResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeInputResponse)

-- | Settings for the input devices.
describeInputResponse_inputDevices :: Lens.Lens' DescribeInputResponse (Prelude.Maybe [InputDeviceSettings])
describeInputResponse_inputDevices :: (Maybe [InputDeviceSettings] -> f (Maybe [InputDeviceSettings]))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_inputDevices = (DescribeInputResponse -> Maybe [InputDeviceSettings])
-> (DescribeInputResponse
    -> Maybe [InputDeviceSettings] -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe [InputDeviceSettings])
     (Maybe [InputDeviceSettings])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe [InputDeviceSettings]
inputDevices :: Maybe [InputDeviceSettings]
$sel:inputDevices:DescribeInputResponse' :: DescribeInputResponse -> Maybe [InputDeviceSettings]
inputDevices} -> Maybe [InputDeviceSettings]
inputDevices) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe [InputDeviceSettings]
a -> DescribeInputResponse
s {$sel:inputDevices:DescribeInputResponse' :: Maybe [InputDeviceSettings]
inputDevices = Maybe [InputDeviceSettings]
a} :: DescribeInputResponse) ((Maybe [InputDeviceSettings] -> f (Maybe [InputDeviceSettings]))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((Maybe [InputDeviceSettings]
     -> f (Maybe [InputDeviceSettings]))
    -> Maybe [InputDeviceSettings] -> f (Maybe [InputDeviceSettings]))
-> (Maybe [InputDeviceSettings] -> f (Maybe [InputDeviceSettings]))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InputDeviceSettings]
  [InputDeviceSettings]
  [InputDeviceSettings]
  [InputDeviceSettings]
-> Iso
     (Maybe [InputDeviceSettings])
     (Maybe [InputDeviceSettings])
     (Maybe [InputDeviceSettings])
     (Maybe [InputDeviceSettings])
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
  [InputDeviceSettings]
  [InputDeviceSettings]
  [InputDeviceSettings]
  [InputDeviceSettings]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of IDs for all Inputs which are partners of this one.
describeInputResponse_inputPartnerIds :: Lens.Lens' DescribeInputResponse (Prelude.Maybe [Prelude.Text])
describeInputResponse_inputPartnerIds :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_inputPartnerIds = (DescribeInputResponse -> Maybe [Text])
-> (DescribeInputResponse -> Maybe [Text] -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe [Text]
inputPartnerIds :: Maybe [Text]
$sel:inputPartnerIds:DescribeInputResponse' :: DescribeInputResponse -> Maybe [Text]
inputPartnerIds} -> Maybe [Text]
inputPartnerIds) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe [Text]
a -> DescribeInputResponse
s {$sel:inputPartnerIds:DescribeInputResponse' :: Maybe [Text]
inputPartnerIds = Maybe [Text]
a} :: DescribeInputResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of the sources of the input (PULL-type).
describeInputResponse_sources :: Lens.Lens' DescribeInputResponse (Prelude.Maybe [InputSource])
describeInputResponse_sources :: (Maybe [InputSource] -> f (Maybe [InputSource]))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_sources = (DescribeInputResponse -> Maybe [InputSource])
-> (DescribeInputResponse
    -> Maybe [InputSource] -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe [InputSource])
     (Maybe [InputSource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe [InputSource]
sources :: Maybe [InputSource]
$sel:sources:DescribeInputResponse' :: DescribeInputResponse -> Maybe [InputSource]
sources} -> Maybe [InputSource]
sources) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe [InputSource]
a -> DescribeInputResponse
s {$sel:sources:DescribeInputResponse' :: Maybe [InputSource]
sources = Maybe [InputSource]
a} :: DescribeInputResponse) ((Maybe [InputSource] -> f (Maybe [InputSource]))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((Maybe [InputSource] -> f (Maybe [InputSource]))
    -> Maybe [InputSource] -> f (Maybe [InputSource]))
-> (Maybe [InputSource] -> f (Maybe [InputSource]))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [InputSource] [InputSource] [InputSource] [InputSource]
-> Iso
     (Maybe [InputSource])
     (Maybe [InputSource])
     (Maybe [InputSource])
     (Maybe [InputSource])
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 [InputSource] [InputSource] [InputSource] [InputSource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of the destinations of the input (PUSH-type).
describeInputResponse_destinations :: Lens.Lens' DescribeInputResponse (Prelude.Maybe [InputDestination])
describeInputResponse_destinations :: (Maybe [InputDestination] -> f (Maybe [InputDestination]))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_destinations = (DescribeInputResponse -> Maybe [InputDestination])
-> (DescribeInputResponse
    -> Maybe [InputDestination] -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe [InputDestination])
     (Maybe [InputDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe [InputDestination]
destinations :: Maybe [InputDestination]
$sel:destinations:DescribeInputResponse' :: DescribeInputResponse -> Maybe [InputDestination]
destinations} -> Maybe [InputDestination]
destinations) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe [InputDestination]
a -> DescribeInputResponse
s {$sel:destinations:DescribeInputResponse' :: Maybe [InputDestination]
destinations = Maybe [InputDestination]
a} :: DescribeInputResponse) ((Maybe [InputDestination] -> f (Maybe [InputDestination]))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((Maybe [InputDestination] -> f (Maybe [InputDestination]))
    -> Maybe [InputDestination] -> f (Maybe [InputDestination]))
-> (Maybe [InputDestination] -> f (Maybe [InputDestination]))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InputDestination]
  [InputDestination]
  [InputDestination]
  [InputDestination]
-> Iso
     (Maybe [InputDestination])
     (Maybe [InputDestination])
     (Maybe [InputDestination])
     (Maybe [InputDestination])
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
  [InputDestination]
  [InputDestination]
  [InputDestination]
  [InputDestination]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The user-assigned name (This is a mutable value).
describeInputResponse_name :: Lens.Lens' DescribeInputResponse (Prelude.Maybe Prelude.Text)
describeInputResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_name = (DescribeInputResponse -> Maybe Text)
-> (DescribeInputResponse -> Maybe Text -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeInputResponse' :: DescribeInputResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe Text
a -> DescribeInputResponse
s {$sel:name:DescribeInputResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeInputResponse)

-- | A list of channel IDs that that input is attached to (currently an input
-- can only be attached to one channel).
describeInputResponse_attachedChannels :: Lens.Lens' DescribeInputResponse (Prelude.Maybe [Prelude.Text])
describeInputResponse_attachedChannels :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_attachedChannels = (DescribeInputResponse -> Maybe [Text])
-> (DescribeInputResponse -> Maybe [Text] -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe [Text]
attachedChannels :: Maybe [Text]
$sel:attachedChannels:DescribeInputResponse' :: DescribeInputResponse -> Maybe [Text]
attachedChannels} -> Maybe [Text]
attachedChannels) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe [Text]
a -> DescribeInputResponse
s {$sel:attachedChannels:DescribeInputResponse' :: Maybe [Text]
attachedChannels = Maybe [Text]
a} :: DescribeInputResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The generated ID of the input (unique for user account, immutable).
describeInputResponse_id :: Lens.Lens' DescribeInputResponse (Prelude.Maybe Prelude.Text)
describeInputResponse_id :: (Maybe Text -> f (Maybe Text))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_id = (DescribeInputResponse -> Maybe Text)
-> (DescribeInputResponse -> Maybe Text -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe Text
id :: Maybe Text
$sel:id:DescribeInputResponse' :: DescribeInputResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe Text
a -> DescribeInputResponse
s {$sel:id:DescribeInputResponse' :: Maybe Text
id = Maybe Text
a} :: DescribeInputResponse)

-- | STANDARD - MediaLive expects two sources to be connected to this input.
-- If the channel is also STANDARD, both sources will be ingested. If the
-- channel is SINGLE_PIPELINE, only the first source will be ingested; the
-- second source will always be ignored, even if the first source fails.
-- SINGLE_PIPELINE - You can connect only one source to this input. If the
-- ChannelClass is also SINGLE_PIPELINE, this value is valid. If the
-- ChannelClass is STANDARD, this value is not valid because the channel
-- requires two sources in the input.
describeInputResponse_inputClass :: Lens.Lens' DescribeInputResponse (Prelude.Maybe InputClass)
describeInputResponse_inputClass :: (Maybe InputClass -> f (Maybe InputClass))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_inputClass = (DescribeInputResponse -> Maybe InputClass)
-> (DescribeInputResponse
    -> Maybe InputClass -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe InputClass)
     (Maybe InputClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe InputClass
inputClass :: Maybe InputClass
$sel:inputClass:DescribeInputResponse' :: DescribeInputResponse -> Maybe InputClass
inputClass} -> Maybe InputClass
inputClass) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe InputClass
a -> DescribeInputResponse
s {$sel:inputClass:DescribeInputResponse' :: Maybe InputClass
inputClass = Maybe InputClass
a} :: DescribeInputResponse)

-- | Undocumented member.
describeInputResponse_type :: Lens.Lens' DescribeInputResponse (Prelude.Maybe InputType)
describeInputResponse_type :: (Maybe InputType -> f (Maybe InputType))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_type = (DescribeInputResponse -> Maybe InputType)
-> (DescribeInputResponse
    -> Maybe InputType -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe InputType)
     (Maybe InputType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe InputType
type' :: Maybe InputType
$sel:type':DescribeInputResponse' :: DescribeInputResponse -> Maybe InputType
type'} -> Maybe InputType
type') (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe InputType
a -> DescribeInputResponse
s {$sel:type':DescribeInputResponse' :: Maybe InputType
type' = Maybe InputType
a} :: DescribeInputResponse)

-- | A list of MediaConnect Flows for this input.
describeInputResponse_mediaConnectFlows :: Lens.Lens' DescribeInputResponse (Prelude.Maybe [MediaConnectFlow])
describeInputResponse_mediaConnectFlows :: (Maybe [MediaConnectFlow] -> f (Maybe [MediaConnectFlow]))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_mediaConnectFlows = (DescribeInputResponse -> Maybe [MediaConnectFlow])
-> (DescribeInputResponse
    -> Maybe [MediaConnectFlow] -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe [MediaConnectFlow])
     (Maybe [MediaConnectFlow])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe [MediaConnectFlow]
mediaConnectFlows :: Maybe [MediaConnectFlow]
$sel:mediaConnectFlows:DescribeInputResponse' :: DescribeInputResponse -> Maybe [MediaConnectFlow]
mediaConnectFlows} -> Maybe [MediaConnectFlow]
mediaConnectFlows) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe [MediaConnectFlow]
a -> DescribeInputResponse
s {$sel:mediaConnectFlows:DescribeInputResponse' :: Maybe [MediaConnectFlow]
mediaConnectFlows = Maybe [MediaConnectFlow]
a} :: DescribeInputResponse) ((Maybe [MediaConnectFlow] -> f (Maybe [MediaConnectFlow]))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((Maybe [MediaConnectFlow] -> f (Maybe [MediaConnectFlow]))
    -> Maybe [MediaConnectFlow] -> f (Maybe [MediaConnectFlow]))
-> (Maybe [MediaConnectFlow] -> f (Maybe [MediaConnectFlow]))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MediaConnectFlow]
  [MediaConnectFlow]
  [MediaConnectFlow]
  [MediaConnectFlow]
-> Iso
     (Maybe [MediaConnectFlow])
     (Maybe [MediaConnectFlow])
     (Maybe [MediaConnectFlow])
     (Maybe [MediaConnectFlow])
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
  [MediaConnectFlow]
  [MediaConnectFlow]
  [MediaConnectFlow]
  [MediaConnectFlow]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Certain pull input sources can be dynamic, meaning that they can have
-- their URL\'s dynamically changes during input switch actions. Presently,
-- this functionality only works with MP4_FILE and TS_FILE inputs.
describeInputResponse_inputSourceType :: Lens.Lens' DescribeInputResponse (Prelude.Maybe InputSourceType)
describeInputResponse_inputSourceType :: (Maybe InputSourceType -> f (Maybe InputSourceType))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_inputSourceType = (DescribeInputResponse -> Maybe InputSourceType)
-> (DescribeInputResponse
    -> Maybe InputSourceType -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe InputSourceType)
     (Maybe InputSourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe InputSourceType
inputSourceType :: Maybe InputSourceType
$sel:inputSourceType:DescribeInputResponse' :: DescribeInputResponse -> Maybe InputSourceType
inputSourceType} -> Maybe InputSourceType
inputSourceType) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe InputSourceType
a -> DescribeInputResponse
s {$sel:inputSourceType:DescribeInputResponse' :: Maybe InputSourceType
inputSourceType = Maybe InputSourceType
a} :: DescribeInputResponse)

-- | A collection of key-value pairs.
describeInputResponse_tags :: Lens.Lens' DescribeInputResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeInputResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_tags = (DescribeInputResponse -> Maybe (HashMap Text Text))
-> (DescribeInputResponse
    -> Maybe (HashMap Text Text) -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeInputResponse' :: DescribeInputResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe (HashMap Text Text)
a -> DescribeInputResponse
s {$sel:tags:DescribeInputResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeInputResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the role this input assumes during and
-- after creation.
describeInputResponse_roleArn :: Lens.Lens' DescribeInputResponse (Prelude.Maybe Prelude.Text)
describeInputResponse_roleArn :: (Maybe Text -> f (Maybe Text))
-> DescribeInputResponse -> f DescribeInputResponse
describeInputResponse_roleArn = (DescribeInputResponse -> Maybe Text)
-> (DescribeInputResponse -> Maybe Text -> DescribeInputResponse)
-> Lens
     DescribeInputResponse
     DescribeInputResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInputResponse' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:DescribeInputResponse' :: DescribeInputResponse -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: DescribeInputResponse
s@DescribeInputResponse' {} Maybe Text
a -> DescribeInputResponse
s {$sel:roleArn:DescribeInputResponse' :: Maybe Text
roleArn = Maybe Text
a} :: DescribeInputResponse)

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

instance Prelude.NFData DescribeInputResponse