{-# 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 #-}
module Amazonka.AppRunner.DeleteVpcIngressConnection
(
DeleteVpcIngressConnection (..),
newDeleteVpcIngressConnection,
deleteVpcIngressConnection_vpcIngressConnectionArn,
DeleteVpcIngressConnectionResponse (..),
newDeleteVpcIngressConnectionResponse,
deleteVpcIngressConnectionResponse_httpStatus,
deleteVpcIngressConnectionResponse_vpcIngressConnection,
)
where
import Amazonka.AppRunner.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteVpcIngressConnection = DeleteVpcIngressConnection'
{
DeleteVpcIngressConnection -> Text
vpcIngressConnectionArn :: Prelude.Text
}
deriving (DeleteVpcIngressConnection -> DeleteVpcIngressConnection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVpcIngressConnection -> DeleteVpcIngressConnection -> Bool
$c/= :: DeleteVpcIngressConnection -> DeleteVpcIngressConnection -> Bool
== :: DeleteVpcIngressConnection -> DeleteVpcIngressConnection -> Bool
$c== :: DeleteVpcIngressConnection -> DeleteVpcIngressConnection -> Bool
Prelude.Eq, ReadPrec [DeleteVpcIngressConnection]
ReadPrec DeleteVpcIngressConnection
Int -> ReadS DeleteVpcIngressConnection
ReadS [DeleteVpcIngressConnection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVpcIngressConnection]
$creadListPrec :: ReadPrec [DeleteVpcIngressConnection]
readPrec :: ReadPrec DeleteVpcIngressConnection
$creadPrec :: ReadPrec DeleteVpcIngressConnection
readList :: ReadS [DeleteVpcIngressConnection]
$creadList :: ReadS [DeleteVpcIngressConnection]
readsPrec :: Int -> ReadS DeleteVpcIngressConnection
$creadsPrec :: Int -> ReadS DeleteVpcIngressConnection
Prelude.Read, Int -> DeleteVpcIngressConnection -> ShowS
[DeleteVpcIngressConnection] -> ShowS
DeleteVpcIngressConnection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVpcIngressConnection] -> ShowS
$cshowList :: [DeleteVpcIngressConnection] -> ShowS
show :: DeleteVpcIngressConnection -> String
$cshow :: DeleteVpcIngressConnection -> String
showsPrec :: Int -> DeleteVpcIngressConnection -> ShowS
$cshowsPrec :: Int -> DeleteVpcIngressConnection -> ShowS
Prelude.Show, forall x.
Rep DeleteVpcIngressConnection x -> DeleteVpcIngressConnection
forall x.
DeleteVpcIngressConnection -> Rep DeleteVpcIngressConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVpcIngressConnection x -> DeleteVpcIngressConnection
$cfrom :: forall x.
DeleteVpcIngressConnection -> Rep DeleteVpcIngressConnection x
Prelude.Generic)
newDeleteVpcIngressConnection ::
Prelude.Text ->
DeleteVpcIngressConnection
newDeleteVpcIngressConnection :: Text -> DeleteVpcIngressConnection
newDeleteVpcIngressConnection
Text
pVpcIngressConnectionArn_ =
DeleteVpcIngressConnection'
{ $sel:vpcIngressConnectionArn:DeleteVpcIngressConnection' :: Text
vpcIngressConnectionArn =
Text
pVpcIngressConnectionArn_
}
deleteVpcIngressConnection_vpcIngressConnectionArn :: Lens.Lens' DeleteVpcIngressConnection Prelude.Text
deleteVpcIngressConnection_vpcIngressConnectionArn :: Lens' DeleteVpcIngressConnection Text
deleteVpcIngressConnection_vpcIngressConnectionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcIngressConnection' {Text
vpcIngressConnectionArn :: Text
$sel:vpcIngressConnectionArn:DeleteVpcIngressConnection' :: DeleteVpcIngressConnection -> Text
vpcIngressConnectionArn} -> Text
vpcIngressConnectionArn) (\s :: DeleteVpcIngressConnection
s@DeleteVpcIngressConnection' {} Text
a -> DeleteVpcIngressConnection
s {$sel:vpcIngressConnectionArn:DeleteVpcIngressConnection' :: Text
vpcIngressConnectionArn = Text
a} :: DeleteVpcIngressConnection)
instance Core.AWSRequest DeleteVpcIngressConnection where
type
AWSResponse DeleteVpcIngressConnection =
DeleteVpcIngressConnectionResponse
request :: (Service -> Service)
-> DeleteVpcIngressConnection -> Request DeleteVpcIngressConnection
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 DeleteVpcIngressConnection
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteVpcIngressConnection)))
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 ->
Int -> VpcIngressConnection -> DeleteVpcIngressConnectionResponse
DeleteVpcIngressConnectionResponse'
forall (f :: * -> *) a b. Functor 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))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"VpcIngressConnection")
)
instance Prelude.Hashable DeleteVpcIngressConnection where
hashWithSalt :: Int -> DeleteVpcIngressConnection -> Int
hashWithSalt Int
_salt DeleteVpcIngressConnection' {Text
vpcIngressConnectionArn :: Text
$sel:vpcIngressConnectionArn:DeleteVpcIngressConnection' :: DeleteVpcIngressConnection -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vpcIngressConnectionArn
instance Prelude.NFData DeleteVpcIngressConnection where
rnf :: DeleteVpcIngressConnection -> ()
rnf DeleteVpcIngressConnection' {Text
vpcIngressConnectionArn :: Text
$sel:vpcIngressConnectionArn:DeleteVpcIngressConnection' :: DeleteVpcIngressConnection -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
vpcIngressConnectionArn
instance Data.ToHeaders DeleteVpcIngressConnection where
toHeaders :: DeleteVpcIngressConnection -> 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
"AppRunner.DeleteVpcIngressConnection" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteVpcIngressConnection where
toJSON :: DeleteVpcIngressConnection -> Value
toJSON DeleteVpcIngressConnection' {Text
vpcIngressConnectionArn :: Text
$sel:vpcIngressConnectionArn:DeleteVpcIngressConnection' :: DeleteVpcIngressConnection -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"VpcIngressConnectionArn"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
vpcIngressConnectionArn
)
]
)
instance Data.ToPath DeleteVpcIngressConnection where
toPath :: DeleteVpcIngressConnection -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteVpcIngressConnection where
toQuery :: DeleteVpcIngressConnection -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteVpcIngressConnectionResponse = DeleteVpcIngressConnectionResponse'
{
DeleteVpcIngressConnectionResponse -> Int
httpStatus :: Prelude.Int,
DeleteVpcIngressConnectionResponse -> VpcIngressConnection
vpcIngressConnection :: VpcIngressConnection
}
deriving (DeleteVpcIngressConnectionResponse
-> DeleteVpcIngressConnectionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVpcIngressConnectionResponse
-> DeleteVpcIngressConnectionResponse -> Bool
$c/= :: DeleteVpcIngressConnectionResponse
-> DeleteVpcIngressConnectionResponse -> Bool
== :: DeleteVpcIngressConnectionResponse
-> DeleteVpcIngressConnectionResponse -> Bool
$c== :: DeleteVpcIngressConnectionResponse
-> DeleteVpcIngressConnectionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVpcIngressConnectionResponse]
ReadPrec DeleteVpcIngressConnectionResponse
Int -> ReadS DeleteVpcIngressConnectionResponse
ReadS [DeleteVpcIngressConnectionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVpcIngressConnectionResponse]
$creadListPrec :: ReadPrec [DeleteVpcIngressConnectionResponse]
readPrec :: ReadPrec DeleteVpcIngressConnectionResponse
$creadPrec :: ReadPrec DeleteVpcIngressConnectionResponse
readList :: ReadS [DeleteVpcIngressConnectionResponse]
$creadList :: ReadS [DeleteVpcIngressConnectionResponse]
readsPrec :: Int -> ReadS DeleteVpcIngressConnectionResponse
$creadsPrec :: Int -> ReadS DeleteVpcIngressConnectionResponse
Prelude.Read, Int -> DeleteVpcIngressConnectionResponse -> ShowS
[DeleteVpcIngressConnectionResponse] -> ShowS
DeleteVpcIngressConnectionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVpcIngressConnectionResponse] -> ShowS
$cshowList :: [DeleteVpcIngressConnectionResponse] -> ShowS
show :: DeleteVpcIngressConnectionResponse -> String
$cshow :: DeleteVpcIngressConnectionResponse -> String
showsPrec :: Int -> DeleteVpcIngressConnectionResponse -> ShowS
$cshowsPrec :: Int -> DeleteVpcIngressConnectionResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteVpcIngressConnectionResponse x
-> DeleteVpcIngressConnectionResponse
forall x.
DeleteVpcIngressConnectionResponse
-> Rep DeleteVpcIngressConnectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVpcIngressConnectionResponse x
-> DeleteVpcIngressConnectionResponse
$cfrom :: forall x.
DeleteVpcIngressConnectionResponse
-> Rep DeleteVpcIngressConnectionResponse x
Prelude.Generic)
newDeleteVpcIngressConnectionResponse ::
Prelude.Int ->
VpcIngressConnection ->
DeleteVpcIngressConnectionResponse
newDeleteVpcIngressConnectionResponse :: Int -> VpcIngressConnection -> DeleteVpcIngressConnectionResponse
newDeleteVpcIngressConnectionResponse
Int
pHttpStatus_
VpcIngressConnection
pVpcIngressConnection_ =
DeleteVpcIngressConnectionResponse'
{ $sel:httpStatus:DeleteVpcIngressConnectionResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:vpcIngressConnection:DeleteVpcIngressConnectionResponse' :: VpcIngressConnection
vpcIngressConnection =
VpcIngressConnection
pVpcIngressConnection_
}
deleteVpcIngressConnectionResponse_httpStatus :: Lens.Lens' DeleteVpcIngressConnectionResponse Prelude.Int
deleteVpcIngressConnectionResponse_httpStatus :: Lens' DeleteVpcIngressConnectionResponse Int
deleteVpcIngressConnectionResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcIngressConnectionResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteVpcIngressConnectionResponse' :: DeleteVpcIngressConnectionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteVpcIngressConnectionResponse
s@DeleteVpcIngressConnectionResponse' {} Int
a -> DeleteVpcIngressConnectionResponse
s {$sel:httpStatus:DeleteVpcIngressConnectionResponse' :: Int
httpStatus = Int
a} :: DeleteVpcIngressConnectionResponse)
deleteVpcIngressConnectionResponse_vpcIngressConnection :: Lens.Lens' DeleteVpcIngressConnectionResponse VpcIngressConnection
deleteVpcIngressConnectionResponse_vpcIngressConnection :: Lens' DeleteVpcIngressConnectionResponse VpcIngressConnection
deleteVpcIngressConnectionResponse_vpcIngressConnection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcIngressConnectionResponse' {VpcIngressConnection
vpcIngressConnection :: VpcIngressConnection
$sel:vpcIngressConnection:DeleteVpcIngressConnectionResponse' :: DeleteVpcIngressConnectionResponse -> VpcIngressConnection
vpcIngressConnection} -> VpcIngressConnection
vpcIngressConnection) (\s :: DeleteVpcIngressConnectionResponse
s@DeleteVpcIngressConnectionResponse' {} VpcIngressConnection
a -> DeleteVpcIngressConnectionResponse
s {$sel:vpcIngressConnection:DeleteVpcIngressConnectionResponse' :: VpcIngressConnection
vpcIngressConnection = VpcIngressConnection
a} :: DeleteVpcIngressConnectionResponse)
instance
Prelude.NFData
DeleteVpcIngressConnectionResponse
where
rnf :: DeleteVpcIngressConnectionResponse -> ()
rnf DeleteVpcIngressConnectionResponse' {Int
VpcIngressConnection
vpcIngressConnection :: VpcIngressConnection
httpStatus :: Int
$sel:vpcIngressConnection:DeleteVpcIngressConnectionResponse' :: DeleteVpcIngressConnectionResponse -> VpcIngressConnection
$sel:httpStatus:DeleteVpcIngressConnectionResponse' :: DeleteVpcIngressConnectionResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VpcIngressConnection
vpcIngressConnection