{-# 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.EC2.DeleteVpcEndpointConnectionNotifications
(
DeleteVpcEndpointConnectionNotifications (..),
newDeleteVpcEndpointConnectionNotifications,
deleteVpcEndpointConnectionNotifications_dryRun,
deleteVpcEndpointConnectionNotifications_connectionNotificationIds,
DeleteVpcEndpointConnectionNotificationsResponse (..),
newDeleteVpcEndpointConnectionNotificationsResponse,
deleteVpcEndpointConnectionNotificationsResponse_unsuccessful,
deleteVpcEndpointConnectionNotificationsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteVpcEndpointConnectionNotifications = DeleteVpcEndpointConnectionNotifications'
{
DeleteVpcEndpointConnectionNotifications -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
DeleteVpcEndpointConnectionNotifications -> [Text]
connectionNotificationIds :: [Prelude.Text]
}
deriving (DeleteVpcEndpointConnectionNotifications
-> DeleteVpcEndpointConnectionNotifications -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVpcEndpointConnectionNotifications
-> DeleteVpcEndpointConnectionNotifications -> Bool
$c/= :: DeleteVpcEndpointConnectionNotifications
-> DeleteVpcEndpointConnectionNotifications -> Bool
== :: DeleteVpcEndpointConnectionNotifications
-> DeleteVpcEndpointConnectionNotifications -> Bool
$c== :: DeleteVpcEndpointConnectionNotifications
-> DeleteVpcEndpointConnectionNotifications -> Bool
Prelude.Eq, ReadPrec [DeleteVpcEndpointConnectionNotifications]
ReadPrec DeleteVpcEndpointConnectionNotifications
Int -> ReadS DeleteVpcEndpointConnectionNotifications
ReadS [DeleteVpcEndpointConnectionNotifications]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVpcEndpointConnectionNotifications]
$creadListPrec :: ReadPrec [DeleteVpcEndpointConnectionNotifications]
readPrec :: ReadPrec DeleteVpcEndpointConnectionNotifications
$creadPrec :: ReadPrec DeleteVpcEndpointConnectionNotifications
readList :: ReadS [DeleteVpcEndpointConnectionNotifications]
$creadList :: ReadS [DeleteVpcEndpointConnectionNotifications]
readsPrec :: Int -> ReadS DeleteVpcEndpointConnectionNotifications
$creadsPrec :: Int -> ReadS DeleteVpcEndpointConnectionNotifications
Prelude.Read, Int -> DeleteVpcEndpointConnectionNotifications -> ShowS
[DeleteVpcEndpointConnectionNotifications] -> ShowS
DeleteVpcEndpointConnectionNotifications -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVpcEndpointConnectionNotifications] -> ShowS
$cshowList :: [DeleteVpcEndpointConnectionNotifications] -> ShowS
show :: DeleteVpcEndpointConnectionNotifications -> String
$cshow :: DeleteVpcEndpointConnectionNotifications -> String
showsPrec :: Int -> DeleteVpcEndpointConnectionNotifications -> ShowS
$cshowsPrec :: Int -> DeleteVpcEndpointConnectionNotifications -> ShowS
Prelude.Show, forall x.
Rep DeleteVpcEndpointConnectionNotifications x
-> DeleteVpcEndpointConnectionNotifications
forall x.
DeleteVpcEndpointConnectionNotifications
-> Rep DeleteVpcEndpointConnectionNotifications x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVpcEndpointConnectionNotifications x
-> DeleteVpcEndpointConnectionNotifications
$cfrom :: forall x.
DeleteVpcEndpointConnectionNotifications
-> Rep DeleteVpcEndpointConnectionNotifications x
Prelude.Generic)
newDeleteVpcEndpointConnectionNotifications ::
DeleteVpcEndpointConnectionNotifications
newDeleteVpcEndpointConnectionNotifications :: DeleteVpcEndpointConnectionNotifications
newDeleteVpcEndpointConnectionNotifications =
DeleteVpcEndpointConnectionNotifications'
{ $sel:dryRun:DeleteVpcEndpointConnectionNotifications' :: Maybe Bool
dryRun =
forall a. Maybe a
Prelude.Nothing,
$sel:connectionNotificationIds:DeleteVpcEndpointConnectionNotifications' :: [Text]
connectionNotificationIds =
forall a. Monoid a => a
Prelude.mempty
}
deleteVpcEndpointConnectionNotifications_dryRun :: Lens.Lens' DeleteVpcEndpointConnectionNotifications (Prelude.Maybe Prelude.Bool)
deleteVpcEndpointConnectionNotifications_dryRun :: Lens' DeleteVpcEndpointConnectionNotifications (Maybe Bool)
deleteVpcEndpointConnectionNotifications_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcEndpointConnectionNotifications' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DeleteVpcEndpointConnectionNotifications' :: DeleteVpcEndpointConnectionNotifications -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DeleteVpcEndpointConnectionNotifications
s@DeleteVpcEndpointConnectionNotifications' {} Maybe Bool
a -> DeleteVpcEndpointConnectionNotifications
s {$sel:dryRun:DeleteVpcEndpointConnectionNotifications' :: Maybe Bool
dryRun = Maybe Bool
a} :: DeleteVpcEndpointConnectionNotifications)
deleteVpcEndpointConnectionNotifications_connectionNotificationIds :: Lens.Lens' DeleteVpcEndpointConnectionNotifications [Prelude.Text]
deleteVpcEndpointConnectionNotifications_connectionNotificationIds :: Lens' DeleteVpcEndpointConnectionNotifications [Text]
deleteVpcEndpointConnectionNotifications_connectionNotificationIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcEndpointConnectionNotifications' {[Text]
connectionNotificationIds :: [Text]
$sel:connectionNotificationIds:DeleteVpcEndpointConnectionNotifications' :: DeleteVpcEndpointConnectionNotifications -> [Text]
connectionNotificationIds} -> [Text]
connectionNotificationIds) (\s :: DeleteVpcEndpointConnectionNotifications
s@DeleteVpcEndpointConnectionNotifications' {} [Text]
a -> DeleteVpcEndpointConnectionNotifications
s {$sel:connectionNotificationIds:DeleteVpcEndpointConnectionNotifications' :: [Text]
connectionNotificationIds = [Text]
a} :: DeleteVpcEndpointConnectionNotifications) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.AWSRequest
DeleteVpcEndpointConnectionNotifications
where
type
AWSResponse
DeleteVpcEndpointConnectionNotifications =
DeleteVpcEndpointConnectionNotificationsResponse
request :: (Service -> Service)
-> DeleteVpcEndpointConnectionNotifications
-> Request DeleteVpcEndpointConnectionNotifications
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteVpcEndpointConnectionNotifications
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DeleteVpcEndpointConnectionNotifications)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [UnsuccessfulItem]
-> Int -> DeleteVpcEndpointConnectionNotificationsResponse
DeleteVpcEndpointConnectionNotificationsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"unsuccessful"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
)
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
DeleteVpcEndpointConnectionNotifications
where
hashWithSalt :: Int -> DeleteVpcEndpointConnectionNotifications -> Int
hashWithSalt
Int
_salt
DeleteVpcEndpointConnectionNotifications' {[Text]
Maybe Bool
connectionNotificationIds :: [Text]
dryRun :: Maybe Bool
$sel:connectionNotificationIds:DeleteVpcEndpointConnectionNotifications' :: DeleteVpcEndpointConnectionNotifications -> [Text]
$sel:dryRun:DeleteVpcEndpointConnectionNotifications' :: DeleteVpcEndpointConnectionNotifications -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
connectionNotificationIds
instance
Prelude.NFData
DeleteVpcEndpointConnectionNotifications
where
rnf :: DeleteVpcEndpointConnectionNotifications -> ()
rnf DeleteVpcEndpointConnectionNotifications' {[Text]
Maybe Bool
connectionNotificationIds :: [Text]
dryRun :: Maybe Bool
$sel:connectionNotificationIds:DeleteVpcEndpointConnectionNotifications' :: DeleteVpcEndpointConnectionNotifications -> [Text]
$sel:dryRun:DeleteVpcEndpointConnectionNotifications' :: DeleteVpcEndpointConnectionNotifications -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
connectionNotificationIds
instance
Data.ToHeaders
DeleteVpcEndpointConnectionNotifications
where
toHeaders :: DeleteVpcEndpointConnectionNotifications -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance
Data.ToPath
DeleteVpcEndpointConnectionNotifications
where
toPath :: DeleteVpcEndpointConnectionNotifications -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
DeleteVpcEndpointConnectionNotifications
where
toQuery :: DeleteVpcEndpointConnectionNotifications -> QueryString
toQuery DeleteVpcEndpointConnectionNotifications' {[Text]
Maybe Bool
connectionNotificationIds :: [Text]
dryRun :: Maybe Bool
$sel:connectionNotificationIds:DeleteVpcEndpointConnectionNotifications' :: DeleteVpcEndpointConnectionNotifications -> [Text]
$sel:dryRun:DeleteVpcEndpointConnectionNotifications' :: DeleteVpcEndpointConnectionNotifications -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DeleteVpcEndpointConnectionNotifications" ::
Prelude.ByteString
),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList
ByteString
"ConnectionNotificationId"
[Text]
connectionNotificationIds
]
data DeleteVpcEndpointConnectionNotificationsResponse = DeleteVpcEndpointConnectionNotificationsResponse'
{
DeleteVpcEndpointConnectionNotificationsResponse
-> Maybe [UnsuccessfulItem]
unsuccessful :: Prelude.Maybe [UnsuccessfulItem],
DeleteVpcEndpointConnectionNotificationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteVpcEndpointConnectionNotificationsResponse
-> DeleteVpcEndpointConnectionNotificationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVpcEndpointConnectionNotificationsResponse
-> DeleteVpcEndpointConnectionNotificationsResponse -> Bool
$c/= :: DeleteVpcEndpointConnectionNotificationsResponse
-> DeleteVpcEndpointConnectionNotificationsResponse -> Bool
== :: DeleteVpcEndpointConnectionNotificationsResponse
-> DeleteVpcEndpointConnectionNotificationsResponse -> Bool
$c== :: DeleteVpcEndpointConnectionNotificationsResponse
-> DeleteVpcEndpointConnectionNotificationsResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVpcEndpointConnectionNotificationsResponse]
ReadPrec DeleteVpcEndpointConnectionNotificationsResponse
Int -> ReadS DeleteVpcEndpointConnectionNotificationsResponse
ReadS [DeleteVpcEndpointConnectionNotificationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVpcEndpointConnectionNotificationsResponse]
$creadListPrec :: ReadPrec [DeleteVpcEndpointConnectionNotificationsResponse]
readPrec :: ReadPrec DeleteVpcEndpointConnectionNotificationsResponse
$creadPrec :: ReadPrec DeleteVpcEndpointConnectionNotificationsResponse
readList :: ReadS [DeleteVpcEndpointConnectionNotificationsResponse]
$creadList :: ReadS [DeleteVpcEndpointConnectionNotificationsResponse]
readsPrec :: Int -> ReadS DeleteVpcEndpointConnectionNotificationsResponse
$creadsPrec :: Int -> ReadS DeleteVpcEndpointConnectionNotificationsResponse
Prelude.Read, Int -> DeleteVpcEndpointConnectionNotificationsResponse -> ShowS
[DeleteVpcEndpointConnectionNotificationsResponse] -> ShowS
DeleteVpcEndpointConnectionNotificationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVpcEndpointConnectionNotificationsResponse] -> ShowS
$cshowList :: [DeleteVpcEndpointConnectionNotificationsResponse] -> ShowS
show :: DeleteVpcEndpointConnectionNotificationsResponse -> String
$cshow :: DeleteVpcEndpointConnectionNotificationsResponse -> String
showsPrec :: Int -> DeleteVpcEndpointConnectionNotificationsResponse -> ShowS
$cshowsPrec :: Int -> DeleteVpcEndpointConnectionNotificationsResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteVpcEndpointConnectionNotificationsResponse x
-> DeleteVpcEndpointConnectionNotificationsResponse
forall x.
DeleteVpcEndpointConnectionNotificationsResponse
-> Rep DeleteVpcEndpointConnectionNotificationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVpcEndpointConnectionNotificationsResponse x
-> DeleteVpcEndpointConnectionNotificationsResponse
$cfrom :: forall x.
DeleteVpcEndpointConnectionNotificationsResponse
-> Rep DeleteVpcEndpointConnectionNotificationsResponse x
Prelude.Generic)
newDeleteVpcEndpointConnectionNotificationsResponse ::
Prelude.Int ->
DeleteVpcEndpointConnectionNotificationsResponse
newDeleteVpcEndpointConnectionNotificationsResponse :: Int -> DeleteVpcEndpointConnectionNotificationsResponse
newDeleteVpcEndpointConnectionNotificationsResponse
Int
pHttpStatus_ =
DeleteVpcEndpointConnectionNotificationsResponse'
{ $sel:unsuccessful:DeleteVpcEndpointConnectionNotificationsResponse' :: Maybe [UnsuccessfulItem]
unsuccessful =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteVpcEndpointConnectionNotificationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteVpcEndpointConnectionNotificationsResponse_unsuccessful :: Lens.Lens' DeleteVpcEndpointConnectionNotificationsResponse (Prelude.Maybe [UnsuccessfulItem])
deleteVpcEndpointConnectionNotificationsResponse_unsuccessful :: Lens'
DeleteVpcEndpointConnectionNotificationsResponse
(Maybe [UnsuccessfulItem])
deleteVpcEndpointConnectionNotificationsResponse_unsuccessful = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcEndpointConnectionNotificationsResponse' {Maybe [UnsuccessfulItem]
unsuccessful :: Maybe [UnsuccessfulItem]
$sel:unsuccessful:DeleteVpcEndpointConnectionNotificationsResponse' :: DeleteVpcEndpointConnectionNotificationsResponse
-> Maybe [UnsuccessfulItem]
unsuccessful} -> Maybe [UnsuccessfulItem]
unsuccessful) (\s :: DeleteVpcEndpointConnectionNotificationsResponse
s@DeleteVpcEndpointConnectionNotificationsResponse' {} Maybe [UnsuccessfulItem]
a -> DeleteVpcEndpointConnectionNotificationsResponse
s {$sel:unsuccessful:DeleteVpcEndpointConnectionNotificationsResponse' :: Maybe [UnsuccessfulItem]
unsuccessful = Maybe [UnsuccessfulItem]
a} :: DeleteVpcEndpointConnectionNotificationsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
deleteVpcEndpointConnectionNotificationsResponse_httpStatus :: Lens.Lens' DeleteVpcEndpointConnectionNotificationsResponse Prelude.Int
deleteVpcEndpointConnectionNotificationsResponse_httpStatus :: Lens' DeleteVpcEndpointConnectionNotificationsResponse Int
deleteVpcEndpointConnectionNotificationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcEndpointConnectionNotificationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteVpcEndpointConnectionNotificationsResponse' :: DeleteVpcEndpointConnectionNotificationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteVpcEndpointConnectionNotificationsResponse
s@DeleteVpcEndpointConnectionNotificationsResponse' {} Int
a -> DeleteVpcEndpointConnectionNotificationsResponse
s {$sel:httpStatus:DeleteVpcEndpointConnectionNotificationsResponse' :: Int
httpStatus = Int
a} :: DeleteVpcEndpointConnectionNotificationsResponse)
instance
Prelude.NFData
DeleteVpcEndpointConnectionNotificationsResponse
where
rnf :: DeleteVpcEndpointConnectionNotificationsResponse -> ()
rnf
DeleteVpcEndpointConnectionNotificationsResponse' {Int
Maybe [UnsuccessfulItem]
httpStatus :: Int
unsuccessful :: Maybe [UnsuccessfulItem]
$sel:httpStatus:DeleteVpcEndpointConnectionNotificationsResponse' :: DeleteVpcEndpointConnectionNotificationsResponse -> Int
$sel:unsuccessful:DeleteVpcEndpointConnectionNotificationsResponse' :: DeleteVpcEndpointConnectionNotificationsResponse
-> Maybe [UnsuccessfulItem]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [UnsuccessfulItem]
unsuccessful
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus