{-# 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.AddApplicationVpcConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Adds a Virtual Private Cloud (VPC) configuration to the application.
-- Applications can use VPCs to store and access resources securely.
--
-- Note the following about VPC configurations for Kinesis Data Analytics
-- applications:
--
-- -   VPC configurations are not supported for SQL applications.
--
-- -   When a VPC is added to a Kinesis Data Analytics application, the
--     application can no longer be accessed from the Internet directly. To
--     enable Internet access to the application, add an Internet gateway
--     to your VPC.
module Amazonka.KinesisAnalyticsV2.AddApplicationVpcConfiguration
  ( -- * Creating a Request
    AddApplicationVpcConfiguration (..),
    newAddApplicationVpcConfiguration,

    -- * Request Lenses
    addApplicationVpcConfiguration_conditionalToken,
    addApplicationVpcConfiguration_currentApplicationVersionId,
    addApplicationVpcConfiguration_applicationName,
    addApplicationVpcConfiguration_vpcConfiguration,

    -- * Destructuring the Response
    AddApplicationVpcConfigurationResponse (..),
    newAddApplicationVpcConfigurationResponse,

    -- * Response Lenses
    addApplicationVpcConfigurationResponse_applicationARN,
    addApplicationVpcConfigurationResponse_applicationVersionId,
    addApplicationVpcConfigurationResponse_vpcConfigurationDescription,
    addApplicationVpcConfigurationResponse_httpStatus,
  )
where

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

-- | /See:/ 'newAddApplicationVpcConfiguration' smart constructor.
data AddApplicationVpcConfiguration = AddApplicationVpcConfiguration'
  { -- | A value you use to implement strong concurrency for application updates.
    -- You must provide the @ApplicationVersionID@ or the @ConditionalToken@.
    -- You get the application\'s current @ConditionalToken@ using
    -- DescribeApplication. For better concurrency support, use the
    -- @ConditionalToken@ parameter instead of @CurrentApplicationVersionId@.
    AddApplicationVpcConfiguration -> Maybe Text
conditionalToken :: Prelude.Maybe Prelude.Text,
    -- | The version of the application to which you want to add the VPC
    -- configuration. You must provide the @CurrentApplicationVersionId@ or the
    -- @ConditionalToken@. You can use the DescribeApplication operation to get
    -- the current application version. If the version specified is not the
    -- current version, the @ConcurrentModificationException@ is returned. For
    -- better concurrency support, use the @ConditionalToken@ parameter instead
    -- of @CurrentApplicationVersionId@.
    AddApplicationVpcConfiguration -> Maybe Natural
currentApplicationVersionId :: Prelude.Maybe Prelude.Natural,
    -- | The name of an existing application.
    AddApplicationVpcConfiguration -> Text
applicationName :: Prelude.Text,
    -- | Description of the VPC to add to the application.
    AddApplicationVpcConfiguration -> VpcConfiguration
vpcConfiguration :: VpcConfiguration
  }
  deriving (AddApplicationVpcConfiguration
-> AddApplicationVpcConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddApplicationVpcConfiguration
-> AddApplicationVpcConfiguration -> Bool
$c/= :: AddApplicationVpcConfiguration
-> AddApplicationVpcConfiguration -> Bool
== :: AddApplicationVpcConfiguration
-> AddApplicationVpcConfiguration -> Bool
$c== :: AddApplicationVpcConfiguration
-> AddApplicationVpcConfiguration -> Bool
Prelude.Eq, ReadPrec [AddApplicationVpcConfiguration]
ReadPrec AddApplicationVpcConfiguration
Int -> ReadS AddApplicationVpcConfiguration
ReadS [AddApplicationVpcConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddApplicationVpcConfiguration]
$creadListPrec :: ReadPrec [AddApplicationVpcConfiguration]
readPrec :: ReadPrec AddApplicationVpcConfiguration
$creadPrec :: ReadPrec AddApplicationVpcConfiguration
readList :: ReadS [AddApplicationVpcConfiguration]
$creadList :: ReadS [AddApplicationVpcConfiguration]
readsPrec :: Int -> ReadS AddApplicationVpcConfiguration
$creadsPrec :: Int -> ReadS AddApplicationVpcConfiguration
Prelude.Read, Int -> AddApplicationVpcConfiguration -> ShowS
[AddApplicationVpcConfiguration] -> ShowS
AddApplicationVpcConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddApplicationVpcConfiguration] -> ShowS
$cshowList :: [AddApplicationVpcConfiguration] -> ShowS
show :: AddApplicationVpcConfiguration -> String
$cshow :: AddApplicationVpcConfiguration -> String
showsPrec :: Int -> AddApplicationVpcConfiguration -> ShowS
$cshowsPrec :: Int -> AddApplicationVpcConfiguration -> ShowS
Prelude.Show, forall x.
Rep AddApplicationVpcConfiguration x
-> AddApplicationVpcConfiguration
forall x.
AddApplicationVpcConfiguration
-> Rep AddApplicationVpcConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddApplicationVpcConfiguration x
-> AddApplicationVpcConfiguration
$cfrom :: forall x.
AddApplicationVpcConfiguration
-> Rep AddApplicationVpcConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'AddApplicationVpcConfiguration' 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:
--
-- 'conditionalToken', 'addApplicationVpcConfiguration_conditionalToken' - A value you use to implement strong concurrency for application updates.
-- You must provide the @ApplicationVersionID@ or the @ConditionalToken@.
-- You get the application\'s current @ConditionalToken@ using
-- DescribeApplication. For better concurrency support, use the
-- @ConditionalToken@ parameter instead of @CurrentApplicationVersionId@.
--
-- 'currentApplicationVersionId', 'addApplicationVpcConfiguration_currentApplicationVersionId' - The version of the application to which you want to add the VPC
-- configuration. You must provide the @CurrentApplicationVersionId@ or the
-- @ConditionalToken@. You can use the DescribeApplication operation to get
-- the current application version. If the version specified is not the
-- current version, the @ConcurrentModificationException@ is returned. For
-- better concurrency support, use the @ConditionalToken@ parameter instead
-- of @CurrentApplicationVersionId@.
--
-- 'applicationName', 'addApplicationVpcConfiguration_applicationName' - The name of an existing application.
--
-- 'vpcConfiguration', 'addApplicationVpcConfiguration_vpcConfiguration' - Description of the VPC to add to the application.
newAddApplicationVpcConfiguration ::
  -- | 'applicationName'
  Prelude.Text ->
  -- | 'vpcConfiguration'
  VpcConfiguration ->
  AddApplicationVpcConfiguration
newAddApplicationVpcConfiguration :: Text -> VpcConfiguration -> AddApplicationVpcConfiguration
newAddApplicationVpcConfiguration
  Text
pApplicationName_
  VpcConfiguration
pVpcConfiguration_ =
    AddApplicationVpcConfiguration'
      { $sel:conditionalToken:AddApplicationVpcConfiguration' :: Maybe Text
conditionalToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:currentApplicationVersionId:AddApplicationVpcConfiguration' :: Maybe Natural
currentApplicationVersionId =
          forall a. Maybe a
Prelude.Nothing,
        $sel:applicationName:AddApplicationVpcConfiguration' :: Text
applicationName = Text
pApplicationName_,
        $sel:vpcConfiguration:AddApplicationVpcConfiguration' :: VpcConfiguration
vpcConfiguration = VpcConfiguration
pVpcConfiguration_
      }

-- | A value you use to implement strong concurrency for application updates.
-- You must provide the @ApplicationVersionID@ or the @ConditionalToken@.
-- You get the application\'s current @ConditionalToken@ using
-- DescribeApplication. For better concurrency support, use the
-- @ConditionalToken@ parameter instead of @CurrentApplicationVersionId@.
addApplicationVpcConfiguration_conditionalToken :: Lens.Lens' AddApplicationVpcConfiguration (Prelude.Maybe Prelude.Text)
addApplicationVpcConfiguration_conditionalToken :: Lens' AddApplicationVpcConfiguration (Maybe Text)
addApplicationVpcConfiguration_conditionalToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationVpcConfiguration' {Maybe Text
conditionalToken :: Maybe Text
$sel:conditionalToken:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Maybe Text
conditionalToken} -> Maybe Text
conditionalToken) (\s :: AddApplicationVpcConfiguration
s@AddApplicationVpcConfiguration' {} Maybe Text
a -> AddApplicationVpcConfiguration
s {$sel:conditionalToken:AddApplicationVpcConfiguration' :: Maybe Text
conditionalToken = Maybe Text
a} :: AddApplicationVpcConfiguration)

-- | The version of the application to which you want to add the VPC
-- configuration. You must provide the @CurrentApplicationVersionId@ or the
-- @ConditionalToken@. You can use the DescribeApplication operation to get
-- the current application version. If the version specified is not the
-- current version, the @ConcurrentModificationException@ is returned. For
-- better concurrency support, use the @ConditionalToken@ parameter instead
-- of @CurrentApplicationVersionId@.
addApplicationVpcConfiguration_currentApplicationVersionId :: Lens.Lens' AddApplicationVpcConfiguration (Prelude.Maybe Prelude.Natural)
addApplicationVpcConfiguration_currentApplicationVersionId :: Lens' AddApplicationVpcConfiguration (Maybe Natural)
addApplicationVpcConfiguration_currentApplicationVersionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationVpcConfiguration' {Maybe Natural
currentApplicationVersionId :: Maybe Natural
$sel:currentApplicationVersionId:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Maybe Natural
currentApplicationVersionId} -> Maybe Natural
currentApplicationVersionId) (\s :: AddApplicationVpcConfiguration
s@AddApplicationVpcConfiguration' {} Maybe Natural
a -> AddApplicationVpcConfiguration
s {$sel:currentApplicationVersionId:AddApplicationVpcConfiguration' :: Maybe Natural
currentApplicationVersionId = Maybe Natural
a} :: AddApplicationVpcConfiguration)

-- | The name of an existing application.
addApplicationVpcConfiguration_applicationName :: Lens.Lens' AddApplicationVpcConfiguration Prelude.Text
addApplicationVpcConfiguration_applicationName :: Lens' AddApplicationVpcConfiguration Text
addApplicationVpcConfiguration_applicationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationVpcConfiguration' {Text
applicationName :: Text
$sel:applicationName:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Text
applicationName} -> Text
applicationName) (\s :: AddApplicationVpcConfiguration
s@AddApplicationVpcConfiguration' {} Text
a -> AddApplicationVpcConfiguration
s {$sel:applicationName:AddApplicationVpcConfiguration' :: Text
applicationName = Text
a} :: AddApplicationVpcConfiguration)

-- | Description of the VPC to add to the application.
addApplicationVpcConfiguration_vpcConfiguration :: Lens.Lens' AddApplicationVpcConfiguration VpcConfiguration
addApplicationVpcConfiguration_vpcConfiguration :: Lens' AddApplicationVpcConfiguration VpcConfiguration
addApplicationVpcConfiguration_vpcConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationVpcConfiguration' {VpcConfiguration
vpcConfiguration :: VpcConfiguration
$sel:vpcConfiguration:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> VpcConfiguration
vpcConfiguration} -> VpcConfiguration
vpcConfiguration) (\s :: AddApplicationVpcConfiguration
s@AddApplicationVpcConfiguration' {} VpcConfiguration
a -> AddApplicationVpcConfiguration
s {$sel:vpcConfiguration:AddApplicationVpcConfiguration' :: VpcConfiguration
vpcConfiguration = VpcConfiguration
a} :: AddApplicationVpcConfiguration)

instance
  Core.AWSRequest
    AddApplicationVpcConfiguration
  where
  type
    AWSResponse AddApplicationVpcConfiguration =
      AddApplicationVpcConfigurationResponse
  request :: (Service -> Service)
-> AddApplicationVpcConfiguration
-> Request AddApplicationVpcConfiguration
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy AddApplicationVpcConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse AddApplicationVpcConfiguration)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Natural
-> Maybe VpcConfigurationDescription
-> Int
-> AddApplicationVpcConfigurationResponse
AddApplicationVpcConfigurationResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ApplicationARN")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ApplicationVersionId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"VpcConfigurationDescription")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    AddApplicationVpcConfiguration
  where
  hashWithSalt :: Int -> AddApplicationVpcConfiguration -> Int
hashWithSalt
    Int
_salt
    AddApplicationVpcConfiguration' {Maybe Natural
Maybe Text
Text
VpcConfiguration
vpcConfiguration :: VpcConfiguration
applicationName :: Text
currentApplicationVersionId :: Maybe Natural
conditionalToken :: Maybe Text
$sel:vpcConfiguration:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> VpcConfiguration
$sel:applicationName:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Text
$sel:currentApplicationVersionId:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Maybe Natural
$sel:conditionalToken:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
conditionalToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
currentApplicationVersionId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VpcConfiguration
vpcConfiguration

instance
  Prelude.NFData
    AddApplicationVpcConfiguration
  where
  rnf :: AddApplicationVpcConfiguration -> ()
rnf AddApplicationVpcConfiguration' {Maybe Natural
Maybe Text
Text
VpcConfiguration
vpcConfiguration :: VpcConfiguration
applicationName :: Text
currentApplicationVersionId :: Maybe Natural
conditionalToken :: Maybe Text
$sel:vpcConfiguration:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> VpcConfiguration
$sel:applicationName:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Text
$sel:currentApplicationVersionId:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Maybe Natural
$sel:conditionalToken:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
conditionalToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
currentApplicationVersionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
applicationName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VpcConfiguration
vpcConfiguration

instance
  Data.ToHeaders
    AddApplicationVpcConfiguration
  where
  toHeaders :: AddApplicationVpcConfiguration -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"KinesisAnalytics_20180523.AddApplicationVpcConfiguration" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON AddApplicationVpcConfiguration where
  toJSON :: AddApplicationVpcConfiguration -> Value
toJSON AddApplicationVpcConfiguration' {Maybe Natural
Maybe Text
Text
VpcConfiguration
vpcConfiguration :: VpcConfiguration
applicationName :: Text
currentApplicationVersionId :: Maybe Natural
conditionalToken :: Maybe Text
$sel:vpcConfiguration:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> VpcConfiguration
$sel:applicationName:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Text
$sel:currentApplicationVersionId:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Maybe Natural
$sel:conditionalToken:AddApplicationVpcConfiguration' :: AddApplicationVpcConfiguration -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ConditionalToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
conditionalToken,
            (Key
"CurrentApplicationVersionId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
currentApplicationVersionId,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"ApplicationName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
applicationName),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"VpcConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= VpcConfiguration
vpcConfiguration)
          ]
      )

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

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

-- | /See:/ 'newAddApplicationVpcConfigurationResponse' smart constructor.
data AddApplicationVpcConfigurationResponse = AddApplicationVpcConfigurationResponse'
  { -- | The ARN of the application.
    AddApplicationVpcConfigurationResponse -> Maybe Text
applicationARN :: Prelude.Maybe Prelude.Text,
    -- | Provides the current application version. Kinesis Data Analytics updates
    -- the ApplicationVersionId each time you update the application.
    AddApplicationVpcConfigurationResponse -> Maybe Natural
applicationVersionId :: Prelude.Maybe Prelude.Natural,
    -- | The parameters of the new VPC configuration.
    AddApplicationVpcConfigurationResponse
-> Maybe VpcConfigurationDescription
vpcConfigurationDescription :: Prelude.Maybe VpcConfigurationDescription,
    -- | The response's http status code.
    AddApplicationVpcConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AddApplicationVpcConfigurationResponse
-> AddApplicationVpcConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddApplicationVpcConfigurationResponse
-> AddApplicationVpcConfigurationResponse -> Bool
$c/= :: AddApplicationVpcConfigurationResponse
-> AddApplicationVpcConfigurationResponse -> Bool
== :: AddApplicationVpcConfigurationResponse
-> AddApplicationVpcConfigurationResponse -> Bool
$c== :: AddApplicationVpcConfigurationResponse
-> AddApplicationVpcConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [AddApplicationVpcConfigurationResponse]
ReadPrec AddApplicationVpcConfigurationResponse
Int -> ReadS AddApplicationVpcConfigurationResponse
ReadS [AddApplicationVpcConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddApplicationVpcConfigurationResponse]
$creadListPrec :: ReadPrec [AddApplicationVpcConfigurationResponse]
readPrec :: ReadPrec AddApplicationVpcConfigurationResponse
$creadPrec :: ReadPrec AddApplicationVpcConfigurationResponse
readList :: ReadS [AddApplicationVpcConfigurationResponse]
$creadList :: ReadS [AddApplicationVpcConfigurationResponse]
readsPrec :: Int -> ReadS AddApplicationVpcConfigurationResponse
$creadsPrec :: Int -> ReadS AddApplicationVpcConfigurationResponse
Prelude.Read, Int -> AddApplicationVpcConfigurationResponse -> ShowS
[AddApplicationVpcConfigurationResponse] -> ShowS
AddApplicationVpcConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddApplicationVpcConfigurationResponse] -> ShowS
$cshowList :: [AddApplicationVpcConfigurationResponse] -> ShowS
show :: AddApplicationVpcConfigurationResponse -> String
$cshow :: AddApplicationVpcConfigurationResponse -> String
showsPrec :: Int -> AddApplicationVpcConfigurationResponse -> ShowS
$cshowsPrec :: Int -> AddApplicationVpcConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep AddApplicationVpcConfigurationResponse x
-> AddApplicationVpcConfigurationResponse
forall x.
AddApplicationVpcConfigurationResponse
-> Rep AddApplicationVpcConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddApplicationVpcConfigurationResponse x
-> AddApplicationVpcConfigurationResponse
$cfrom :: forall x.
AddApplicationVpcConfigurationResponse
-> Rep AddApplicationVpcConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'AddApplicationVpcConfigurationResponse' 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', 'addApplicationVpcConfigurationResponse_applicationARN' - The ARN of the application.
--
-- 'applicationVersionId', 'addApplicationVpcConfigurationResponse_applicationVersionId' - Provides the current application version. Kinesis Data Analytics updates
-- the ApplicationVersionId each time you update the application.
--
-- 'vpcConfigurationDescription', 'addApplicationVpcConfigurationResponse_vpcConfigurationDescription' - The parameters of the new VPC configuration.
--
-- 'httpStatus', 'addApplicationVpcConfigurationResponse_httpStatus' - The response's http status code.
newAddApplicationVpcConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AddApplicationVpcConfigurationResponse
newAddApplicationVpcConfigurationResponse :: Int -> AddApplicationVpcConfigurationResponse
newAddApplicationVpcConfigurationResponse
  Int
pHttpStatus_ =
    AddApplicationVpcConfigurationResponse'
      { $sel:applicationARN:AddApplicationVpcConfigurationResponse' :: Maybe Text
applicationARN =
          forall a. Maybe a
Prelude.Nothing,
        $sel:applicationVersionId:AddApplicationVpcConfigurationResponse' :: Maybe Natural
applicationVersionId =
          forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfigurationDescription:AddApplicationVpcConfigurationResponse' :: Maybe VpcConfigurationDescription
vpcConfigurationDescription =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:AddApplicationVpcConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The ARN of the application.
addApplicationVpcConfigurationResponse_applicationARN :: Lens.Lens' AddApplicationVpcConfigurationResponse (Prelude.Maybe Prelude.Text)
addApplicationVpcConfigurationResponse_applicationARN :: Lens' AddApplicationVpcConfigurationResponse (Maybe Text)
addApplicationVpcConfigurationResponse_applicationARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationVpcConfigurationResponse' {Maybe Text
applicationARN :: Maybe Text
$sel:applicationARN:AddApplicationVpcConfigurationResponse' :: AddApplicationVpcConfigurationResponse -> Maybe Text
applicationARN} -> Maybe Text
applicationARN) (\s :: AddApplicationVpcConfigurationResponse
s@AddApplicationVpcConfigurationResponse' {} Maybe Text
a -> AddApplicationVpcConfigurationResponse
s {$sel:applicationARN:AddApplicationVpcConfigurationResponse' :: Maybe Text
applicationARN = Maybe Text
a} :: AddApplicationVpcConfigurationResponse)

-- | Provides the current application version. Kinesis Data Analytics updates
-- the ApplicationVersionId each time you update the application.
addApplicationVpcConfigurationResponse_applicationVersionId :: Lens.Lens' AddApplicationVpcConfigurationResponse (Prelude.Maybe Prelude.Natural)
addApplicationVpcConfigurationResponse_applicationVersionId :: Lens' AddApplicationVpcConfigurationResponse (Maybe Natural)
addApplicationVpcConfigurationResponse_applicationVersionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationVpcConfigurationResponse' {Maybe Natural
applicationVersionId :: Maybe Natural
$sel:applicationVersionId:AddApplicationVpcConfigurationResponse' :: AddApplicationVpcConfigurationResponse -> Maybe Natural
applicationVersionId} -> Maybe Natural
applicationVersionId) (\s :: AddApplicationVpcConfigurationResponse
s@AddApplicationVpcConfigurationResponse' {} Maybe Natural
a -> AddApplicationVpcConfigurationResponse
s {$sel:applicationVersionId:AddApplicationVpcConfigurationResponse' :: Maybe Natural
applicationVersionId = Maybe Natural
a} :: AddApplicationVpcConfigurationResponse)

-- | The parameters of the new VPC configuration.
addApplicationVpcConfigurationResponse_vpcConfigurationDescription :: Lens.Lens' AddApplicationVpcConfigurationResponse (Prelude.Maybe VpcConfigurationDescription)
addApplicationVpcConfigurationResponse_vpcConfigurationDescription :: Lens'
  AddApplicationVpcConfigurationResponse
  (Maybe VpcConfigurationDescription)
addApplicationVpcConfigurationResponse_vpcConfigurationDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationVpcConfigurationResponse' {Maybe VpcConfigurationDescription
vpcConfigurationDescription :: Maybe VpcConfigurationDescription
$sel:vpcConfigurationDescription:AddApplicationVpcConfigurationResponse' :: AddApplicationVpcConfigurationResponse
-> Maybe VpcConfigurationDescription
vpcConfigurationDescription} -> Maybe VpcConfigurationDescription
vpcConfigurationDescription) (\s :: AddApplicationVpcConfigurationResponse
s@AddApplicationVpcConfigurationResponse' {} Maybe VpcConfigurationDescription
a -> AddApplicationVpcConfigurationResponse
s {$sel:vpcConfigurationDescription:AddApplicationVpcConfigurationResponse' :: Maybe VpcConfigurationDescription
vpcConfigurationDescription = Maybe VpcConfigurationDescription
a} :: AddApplicationVpcConfigurationResponse)

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

instance
  Prelude.NFData
    AddApplicationVpcConfigurationResponse
  where
  rnf :: AddApplicationVpcConfigurationResponse -> ()
rnf AddApplicationVpcConfigurationResponse' {Int
Maybe Natural
Maybe Text
Maybe VpcConfigurationDescription
httpStatus :: Int
vpcConfigurationDescription :: Maybe VpcConfigurationDescription
applicationVersionId :: Maybe Natural
applicationARN :: Maybe Text
$sel:httpStatus:AddApplicationVpcConfigurationResponse' :: AddApplicationVpcConfigurationResponse -> Int
$sel:vpcConfigurationDescription:AddApplicationVpcConfigurationResponse' :: AddApplicationVpcConfigurationResponse
-> Maybe VpcConfigurationDescription
$sel:applicationVersionId:AddApplicationVpcConfigurationResponse' :: AddApplicationVpcConfigurationResponse -> Maybe Natural
$sel:applicationARN:AddApplicationVpcConfigurationResponse' :: AddApplicationVpcConfigurationResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applicationARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
applicationVersionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcConfigurationDescription
vpcConfigurationDescription
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus