{-# 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.KinesisAnalyticsV2.AddApplicationInput
-- 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)
--
-- Adds a streaming source to your SQL-based Kinesis Data Analytics
-- application.
--
-- You can add a streaming source when you create an application, or you
-- can use this operation to add a streaming source after you create an
-- application. For more information, see CreateApplication.
--
-- Any configuration update, including adding a streaming source using this
-- operation, results in a new version of the application. You can use the
-- DescribeApplication operation to find the current application version.
module Amazonka.KinesisAnalyticsV2.AddApplicationInput
  ( -- * Creating a Request
    AddApplicationInput (..),
    newAddApplicationInput,

    -- * Request Lenses
    addApplicationInput_applicationName,
    addApplicationInput_currentApplicationVersionId,
    addApplicationInput_input,

    -- * Destructuring the Response
    AddApplicationInputResponse (..),
    newAddApplicationInputResponse,

    -- * Response Lenses
    addApplicationInputResponse_applicationARN,
    addApplicationInputResponse_applicationVersionId,
    addApplicationInputResponse_inputDescriptions,
    addApplicationInputResponse_httpStatus,
  )
where

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

-- | /See:/ 'newAddApplicationInput' smart constructor.
data AddApplicationInput = AddApplicationInput'
  { -- | The name of your existing application to which you want to add the
    -- streaming source.
    AddApplicationInput -> Text
applicationName :: Prelude.Text,
    -- | The current version of your application. You must provide the
    -- @ApplicationVersionID@ or the @ConditionalToken@.You can use the
    -- DescribeApplication operation to find the current application version.
    AddApplicationInput -> Natural
currentApplicationVersionId :: Prelude.Natural,
    -- | The Input to add.
    AddApplicationInput -> Input
input :: Input
  }
  deriving (AddApplicationInput -> AddApplicationInput -> Bool
(AddApplicationInput -> AddApplicationInput -> Bool)
-> (AddApplicationInput -> AddApplicationInput -> Bool)
-> Eq AddApplicationInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddApplicationInput -> AddApplicationInput -> Bool
$c/= :: AddApplicationInput -> AddApplicationInput -> Bool
== :: AddApplicationInput -> AddApplicationInput -> Bool
$c== :: AddApplicationInput -> AddApplicationInput -> Bool
Prelude.Eq, ReadPrec [AddApplicationInput]
ReadPrec AddApplicationInput
Int -> ReadS AddApplicationInput
ReadS [AddApplicationInput]
(Int -> ReadS AddApplicationInput)
-> ReadS [AddApplicationInput]
-> ReadPrec AddApplicationInput
-> ReadPrec [AddApplicationInput]
-> Read AddApplicationInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddApplicationInput]
$creadListPrec :: ReadPrec [AddApplicationInput]
readPrec :: ReadPrec AddApplicationInput
$creadPrec :: ReadPrec AddApplicationInput
readList :: ReadS [AddApplicationInput]
$creadList :: ReadS [AddApplicationInput]
readsPrec :: Int -> ReadS AddApplicationInput
$creadsPrec :: Int -> ReadS AddApplicationInput
Prelude.Read, Int -> AddApplicationInput -> ShowS
[AddApplicationInput] -> ShowS
AddApplicationInput -> String
(Int -> AddApplicationInput -> ShowS)
-> (AddApplicationInput -> String)
-> ([AddApplicationInput] -> ShowS)
-> Show AddApplicationInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddApplicationInput] -> ShowS
$cshowList :: [AddApplicationInput] -> ShowS
show :: AddApplicationInput -> String
$cshow :: AddApplicationInput -> String
showsPrec :: Int -> AddApplicationInput -> ShowS
$cshowsPrec :: Int -> AddApplicationInput -> ShowS
Prelude.Show, (forall x. AddApplicationInput -> Rep AddApplicationInput x)
-> (forall x. Rep AddApplicationInput x -> AddApplicationInput)
-> Generic AddApplicationInput
forall x. Rep AddApplicationInput x -> AddApplicationInput
forall x. AddApplicationInput -> Rep AddApplicationInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AddApplicationInput x -> AddApplicationInput
$cfrom :: forall x. AddApplicationInput -> Rep AddApplicationInput x
Prelude.Generic)

-- |
-- Create a value of 'AddApplicationInput' 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:
--
-- 'applicationName', 'addApplicationInput_applicationName' - The name of your existing application to which you want to add the
-- streaming source.
--
-- 'currentApplicationVersionId', 'addApplicationInput_currentApplicationVersionId' - The current version of your application. You must provide the
-- @ApplicationVersionID@ or the @ConditionalToken@.You can use the
-- DescribeApplication operation to find the current application version.
--
-- 'input', 'addApplicationInput_input' - The Input to add.
newAddApplicationInput ::
  -- | 'applicationName'
  Prelude.Text ->
  -- | 'currentApplicationVersionId'
  Prelude.Natural ->
  -- | 'input'
  Input ->
  AddApplicationInput
newAddApplicationInput :: Text -> Natural -> Input -> AddApplicationInput
newAddApplicationInput
  Text
pApplicationName_
  Natural
pCurrentApplicationVersionId_
  Input
pInput_ =
    AddApplicationInput' :: Text -> Natural -> Input -> AddApplicationInput
AddApplicationInput'
      { $sel:applicationName:AddApplicationInput' :: Text
applicationName =
          Text
pApplicationName_,
        $sel:currentApplicationVersionId:AddApplicationInput' :: Natural
currentApplicationVersionId =
          Natural
pCurrentApplicationVersionId_,
        $sel:input:AddApplicationInput' :: Input
input = Input
pInput_
      }

-- | The name of your existing application to which you want to add the
-- streaming source.
addApplicationInput_applicationName :: Lens.Lens' AddApplicationInput Prelude.Text
addApplicationInput_applicationName :: (Text -> f Text) -> AddApplicationInput -> f AddApplicationInput
addApplicationInput_applicationName = (AddApplicationInput -> Text)
-> (AddApplicationInput -> Text -> AddApplicationInput)
-> Lens AddApplicationInput AddApplicationInput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInput' {Text
applicationName :: Text
$sel:applicationName:AddApplicationInput' :: AddApplicationInput -> Text
applicationName} -> Text
applicationName) (\s :: AddApplicationInput
s@AddApplicationInput' {} Text
a -> AddApplicationInput
s {$sel:applicationName:AddApplicationInput' :: Text
applicationName = Text
a} :: AddApplicationInput)

-- | The current version of your application. You must provide the
-- @ApplicationVersionID@ or the @ConditionalToken@.You can use the
-- DescribeApplication operation to find the current application version.
addApplicationInput_currentApplicationVersionId :: Lens.Lens' AddApplicationInput Prelude.Natural
addApplicationInput_currentApplicationVersionId :: (Natural -> f Natural)
-> AddApplicationInput -> f AddApplicationInput
addApplicationInput_currentApplicationVersionId = (AddApplicationInput -> Natural)
-> (AddApplicationInput -> Natural -> AddApplicationInput)
-> Lens AddApplicationInput AddApplicationInput Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInput' {Natural
currentApplicationVersionId :: Natural
$sel:currentApplicationVersionId:AddApplicationInput' :: AddApplicationInput -> Natural
currentApplicationVersionId} -> Natural
currentApplicationVersionId) (\s :: AddApplicationInput
s@AddApplicationInput' {} Natural
a -> AddApplicationInput
s {$sel:currentApplicationVersionId:AddApplicationInput' :: Natural
currentApplicationVersionId = Natural
a} :: AddApplicationInput)

-- | The Input to add.
addApplicationInput_input :: Lens.Lens' AddApplicationInput Input
addApplicationInput_input :: (Input -> f Input) -> AddApplicationInput -> f AddApplicationInput
addApplicationInput_input = (AddApplicationInput -> Input)
-> (AddApplicationInput -> Input -> AddApplicationInput)
-> Lens AddApplicationInput AddApplicationInput Input Input
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInput' {Input
input :: Input
$sel:input:AddApplicationInput' :: AddApplicationInput -> Input
input} -> Input
input) (\s :: AddApplicationInput
s@AddApplicationInput' {} Input
a -> AddApplicationInput
s {$sel:input:AddApplicationInput' :: Input
input = Input
a} :: AddApplicationInput)

instance Core.AWSRequest AddApplicationInput where
  type
    AWSResponse AddApplicationInput =
      AddApplicationInputResponse
  request :: AddApplicationInput -> Request AddApplicationInput
request = Service -> AddApplicationInput -> Request AddApplicationInput
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AddApplicationInput
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AddApplicationInput)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse AddApplicationInput))
-> Logger
-> Service
-> Proxy AddApplicationInput
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AddApplicationInput)))
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 Text
-> Maybe Natural
-> Maybe [InputDescription]
-> Int
-> AddApplicationInputResponse
AddApplicationInputResponse'
            (Maybe Text
 -> Maybe Natural
 -> Maybe [InputDescription]
 -> Int
 -> AddApplicationInputResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Natural
      -> Maybe [InputDescription] -> Int -> AddApplicationInputResponse)
forall (f :: * -> *) a b. Functor 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
"ApplicationARN")
            Either
  String
  (Maybe Natural
   -> Maybe [InputDescription] -> Int -> AddApplicationInputResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe [InputDescription] -> Int -> AddApplicationInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ApplicationVersionId")
            Either
  String
  (Maybe [InputDescription] -> Int -> AddApplicationInputResponse)
-> Either String (Maybe [InputDescription])
-> Either String (Int -> AddApplicationInputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [InputDescription]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"InputDescriptions"
                            Either String (Maybe (Maybe [InputDescription]))
-> Maybe [InputDescription]
-> Either String (Maybe [InputDescription])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [InputDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> AddApplicationInputResponse)
-> Either String Int -> Either String AddApplicationInputResponse
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 AddApplicationInput

instance Prelude.NFData AddApplicationInput

instance Core.ToHeaders AddApplicationInput where
  toHeaders :: AddApplicationInput -> ResponseHeaders
toHeaders =
    ResponseHeaders -> AddApplicationInput -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"KinesisAnalytics_20180523.AddApplicationInput" ::
                          Prelude.ByteString
                      ),
            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.ToJSON AddApplicationInput where
  toJSON :: AddApplicationInput -> Value
toJSON AddApplicationInput' {Natural
Text
Input
input :: Input
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:input:AddApplicationInput' :: AddApplicationInput -> Input
$sel:currentApplicationVersionId:AddApplicationInput' :: AddApplicationInput -> Natural
$sel:applicationName:AddApplicationInput' :: AddApplicationInput -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ApplicationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"CurrentApplicationVersionId"
                  Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
currentApplicationVersionId
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Input" Text -> Input -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Input
input)
          ]
      )

instance Core.ToPath AddApplicationInput where
  toPath :: AddApplicationInput -> ByteString
toPath = ByteString -> AddApplicationInput -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newAddApplicationInputResponse' smart constructor.
data AddApplicationInputResponse = AddApplicationInputResponse'
  { -- | The Amazon Resource Name (ARN) of the application.
    AddApplicationInputResponse -> Maybe Text
applicationARN :: Prelude.Maybe Prelude.Text,
    -- | Provides the current application version.
    AddApplicationInputResponse -> Maybe Natural
applicationVersionId :: Prelude.Maybe Prelude.Natural,
    -- | Describes the application input configuration.
    AddApplicationInputResponse -> Maybe [InputDescription]
inputDescriptions :: Prelude.Maybe [InputDescription],
    -- | The response's http status code.
    AddApplicationInputResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AddApplicationInputResponse -> AddApplicationInputResponse -> Bool
(AddApplicationInputResponse
 -> AddApplicationInputResponse -> Bool)
-> (AddApplicationInputResponse
    -> AddApplicationInputResponse -> Bool)
-> Eq AddApplicationInputResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddApplicationInputResponse -> AddApplicationInputResponse -> Bool
$c/= :: AddApplicationInputResponse -> AddApplicationInputResponse -> Bool
== :: AddApplicationInputResponse -> AddApplicationInputResponse -> Bool
$c== :: AddApplicationInputResponse -> AddApplicationInputResponse -> Bool
Prelude.Eq, ReadPrec [AddApplicationInputResponse]
ReadPrec AddApplicationInputResponse
Int -> ReadS AddApplicationInputResponse
ReadS [AddApplicationInputResponse]
(Int -> ReadS AddApplicationInputResponse)
-> ReadS [AddApplicationInputResponse]
-> ReadPrec AddApplicationInputResponse
-> ReadPrec [AddApplicationInputResponse]
-> Read AddApplicationInputResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddApplicationInputResponse]
$creadListPrec :: ReadPrec [AddApplicationInputResponse]
readPrec :: ReadPrec AddApplicationInputResponse
$creadPrec :: ReadPrec AddApplicationInputResponse
readList :: ReadS [AddApplicationInputResponse]
$creadList :: ReadS [AddApplicationInputResponse]
readsPrec :: Int -> ReadS AddApplicationInputResponse
$creadsPrec :: Int -> ReadS AddApplicationInputResponse
Prelude.Read, Int -> AddApplicationInputResponse -> ShowS
[AddApplicationInputResponse] -> ShowS
AddApplicationInputResponse -> String
(Int -> AddApplicationInputResponse -> ShowS)
-> (AddApplicationInputResponse -> String)
-> ([AddApplicationInputResponse] -> ShowS)
-> Show AddApplicationInputResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddApplicationInputResponse] -> ShowS
$cshowList :: [AddApplicationInputResponse] -> ShowS
show :: AddApplicationInputResponse -> String
$cshow :: AddApplicationInputResponse -> String
showsPrec :: Int -> AddApplicationInputResponse -> ShowS
$cshowsPrec :: Int -> AddApplicationInputResponse -> ShowS
Prelude.Show, (forall x.
 AddApplicationInputResponse -> Rep AddApplicationInputResponse x)
-> (forall x.
    Rep AddApplicationInputResponse x -> AddApplicationInputResponse)
-> Generic AddApplicationInputResponse
forall x.
Rep AddApplicationInputResponse x -> AddApplicationInputResponse
forall x.
AddApplicationInputResponse -> Rep AddApplicationInputResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddApplicationInputResponse x -> AddApplicationInputResponse
$cfrom :: forall x.
AddApplicationInputResponse -> Rep AddApplicationInputResponse x
Prelude.Generic)

-- |
-- Create a value of 'AddApplicationInputResponse' 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:
--
-- 'applicationARN', 'addApplicationInputResponse_applicationARN' - The Amazon Resource Name (ARN) of the application.
--
-- 'applicationVersionId', 'addApplicationInputResponse_applicationVersionId' - Provides the current application version.
--
-- 'inputDescriptions', 'addApplicationInputResponse_inputDescriptions' - Describes the application input configuration.
--
-- 'httpStatus', 'addApplicationInputResponse_httpStatus' - The response's http status code.
newAddApplicationInputResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AddApplicationInputResponse
newAddApplicationInputResponse :: Int -> AddApplicationInputResponse
newAddApplicationInputResponse Int
pHttpStatus_ =
  AddApplicationInputResponse' :: Maybe Text
-> Maybe Natural
-> Maybe [InputDescription]
-> Int
-> AddApplicationInputResponse
AddApplicationInputResponse'
    { $sel:applicationARN:AddApplicationInputResponse' :: Maybe Text
applicationARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationVersionId:AddApplicationInputResponse' :: Maybe Natural
applicationVersionId = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:inputDescriptions:AddApplicationInputResponse' :: Maybe [InputDescription]
inputDescriptions = Maybe [InputDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:AddApplicationInputResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the application.
addApplicationInputResponse_applicationARN :: Lens.Lens' AddApplicationInputResponse (Prelude.Maybe Prelude.Text)
addApplicationInputResponse_applicationARN :: (Maybe Text -> f (Maybe Text))
-> AddApplicationInputResponse -> f AddApplicationInputResponse
addApplicationInputResponse_applicationARN = (AddApplicationInputResponse -> Maybe Text)
-> (AddApplicationInputResponse
    -> Maybe Text -> AddApplicationInputResponse)
-> Lens
     AddApplicationInputResponse
     AddApplicationInputResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputResponse' {Maybe Text
applicationARN :: Maybe Text
$sel:applicationARN:AddApplicationInputResponse' :: AddApplicationInputResponse -> Maybe Text
applicationARN} -> Maybe Text
applicationARN) (\s :: AddApplicationInputResponse
s@AddApplicationInputResponse' {} Maybe Text
a -> AddApplicationInputResponse
s {$sel:applicationARN:AddApplicationInputResponse' :: Maybe Text
applicationARN = Maybe Text
a} :: AddApplicationInputResponse)

-- | Provides the current application version.
addApplicationInputResponse_applicationVersionId :: Lens.Lens' AddApplicationInputResponse (Prelude.Maybe Prelude.Natural)
addApplicationInputResponse_applicationVersionId :: (Maybe Natural -> f (Maybe Natural))
-> AddApplicationInputResponse -> f AddApplicationInputResponse
addApplicationInputResponse_applicationVersionId = (AddApplicationInputResponse -> Maybe Natural)
-> (AddApplicationInputResponse
    -> Maybe Natural -> AddApplicationInputResponse)
-> Lens
     AddApplicationInputResponse
     AddApplicationInputResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputResponse' {Maybe Natural
applicationVersionId :: Maybe Natural
$sel:applicationVersionId:AddApplicationInputResponse' :: AddApplicationInputResponse -> Maybe Natural
applicationVersionId} -> Maybe Natural
applicationVersionId) (\s :: AddApplicationInputResponse
s@AddApplicationInputResponse' {} Maybe Natural
a -> AddApplicationInputResponse
s {$sel:applicationVersionId:AddApplicationInputResponse' :: Maybe Natural
applicationVersionId = Maybe Natural
a} :: AddApplicationInputResponse)

-- | Describes the application input configuration.
addApplicationInputResponse_inputDescriptions :: Lens.Lens' AddApplicationInputResponse (Prelude.Maybe [InputDescription])
addApplicationInputResponse_inputDescriptions :: (Maybe [InputDescription] -> f (Maybe [InputDescription]))
-> AddApplicationInputResponse -> f AddApplicationInputResponse
addApplicationInputResponse_inputDescriptions = (AddApplicationInputResponse -> Maybe [InputDescription])
-> (AddApplicationInputResponse
    -> Maybe [InputDescription] -> AddApplicationInputResponse)
-> Lens
     AddApplicationInputResponse
     AddApplicationInputResponse
     (Maybe [InputDescription])
     (Maybe [InputDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputResponse' {Maybe [InputDescription]
inputDescriptions :: Maybe [InputDescription]
$sel:inputDescriptions:AddApplicationInputResponse' :: AddApplicationInputResponse -> Maybe [InputDescription]
inputDescriptions} -> Maybe [InputDescription]
inputDescriptions) (\s :: AddApplicationInputResponse
s@AddApplicationInputResponse' {} Maybe [InputDescription]
a -> AddApplicationInputResponse
s {$sel:inputDescriptions:AddApplicationInputResponse' :: Maybe [InputDescription]
inputDescriptions = Maybe [InputDescription]
a} :: AddApplicationInputResponse) ((Maybe [InputDescription] -> f (Maybe [InputDescription]))
 -> AddApplicationInputResponse -> f AddApplicationInputResponse)
-> ((Maybe [InputDescription] -> f (Maybe [InputDescription]))
    -> Maybe [InputDescription] -> f (Maybe [InputDescription]))
-> (Maybe [InputDescription] -> f (Maybe [InputDescription]))
-> AddApplicationInputResponse
-> f AddApplicationInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InputDescription]
  [InputDescription]
  [InputDescription]
  [InputDescription]
-> Iso
     (Maybe [InputDescription])
     (Maybe [InputDescription])
     (Maybe [InputDescription])
     (Maybe [InputDescription])
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
  [InputDescription]
  [InputDescription]
  [InputDescription]
  [InputDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData AddApplicationInputResponse