{-# 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.DeleteVpcEndpointServiceConfigurations
(
DeleteVpcEndpointServiceConfigurations (..),
newDeleteVpcEndpointServiceConfigurations,
deleteVpcEndpointServiceConfigurations_dryRun,
deleteVpcEndpointServiceConfigurations_serviceIds,
DeleteVpcEndpointServiceConfigurationsResponse (..),
newDeleteVpcEndpointServiceConfigurationsResponse,
deleteVpcEndpointServiceConfigurationsResponse_unsuccessful,
deleteVpcEndpointServiceConfigurationsResponse_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 DeleteVpcEndpointServiceConfigurations = DeleteVpcEndpointServiceConfigurations'
{
DeleteVpcEndpointServiceConfigurations -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
DeleteVpcEndpointServiceConfigurations -> [Text]
serviceIds :: [Prelude.Text]
}
deriving (DeleteVpcEndpointServiceConfigurations
-> DeleteVpcEndpointServiceConfigurations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVpcEndpointServiceConfigurations
-> DeleteVpcEndpointServiceConfigurations -> Bool
$c/= :: DeleteVpcEndpointServiceConfigurations
-> DeleteVpcEndpointServiceConfigurations -> Bool
== :: DeleteVpcEndpointServiceConfigurations
-> DeleteVpcEndpointServiceConfigurations -> Bool
$c== :: DeleteVpcEndpointServiceConfigurations
-> DeleteVpcEndpointServiceConfigurations -> Bool
Prelude.Eq, ReadPrec [DeleteVpcEndpointServiceConfigurations]
ReadPrec DeleteVpcEndpointServiceConfigurations
Int -> ReadS DeleteVpcEndpointServiceConfigurations
ReadS [DeleteVpcEndpointServiceConfigurations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVpcEndpointServiceConfigurations]
$creadListPrec :: ReadPrec [DeleteVpcEndpointServiceConfigurations]
readPrec :: ReadPrec DeleteVpcEndpointServiceConfigurations
$creadPrec :: ReadPrec DeleteVpcEndpointServiceConfigurations
readList :: ReadS [DeleteVpcEndpointServiceConfigurations]
$creadList :: ReadS [DeleteVpcEndpointServiceConfigurations]
readsPrec :: Int -> ReadS DeleteVpcEndpointServiceConfigurations
$creadsPrec :: Int -> ReadS DeleteVpcEndpointServiceConfigurations
Prelude.Read, Int -> DeleteVpcEndpointServiceConfigurations -> ShowS
[DeleteVpcEndpointServiceConfigurations] -> ShowS
DeleteVpcEndpointServiceConfigurations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVpcEndpointServiceConfigurations] -> ShowS
$cshowList :: [DeleteVpcEndpointServiceConfigurations] -> ShowS
show :: DeleteVpcEndpointServiceConfigurations -> String
$cshow :: DeleteVpcEndpointServiceConfigurations -> String
showsPrec :: Int -> DeleteVpcEndpointServiceConfigurations -> ShowS
$cshowsPrec :: Int -> DeleteVpcEndpointServiceConfigurations -> ShowS
Prelude.Show, forall x.
Rep DeleteVpcEndpointServiceConfigurations x
-> DeleteVpcEndpointServiceConfigurations
forall x.
DeleteVpcEndpointServiceConfigurations
-> Rep DeleteVpcEndpointServiceConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVpcEndpointServiceConfigurations x
-> DeleteVpcEndpointServiceConfigurations
$cfrom :: forall x.
DeleteVpcEndpointServiceConfigurations
-> Rep DeleteVpcEndpointServiceConfigurations x
Prelude.Generic)
newDeleteVpcEndpointServiceConfigurations ::
DeleteVpcEndpointServiceConfigurations
newDeleteVpcEndpointServiceConfigurations :: DeleteVpcEndpointServiceConfigurations
newDeleteVpcEndpointServiceConfigurations =
DeleteVpcEndpointServiceConfigurations'
{ $sel:dryRun:DeleteVpcEndpointServiceConfigurations' :: Maybe Bool
dryRun =
forall a. Maybe a
Prelude.Nothing,
$sel:serviceIds:DeleteVpcEndpointServiceConfigurations' :: [Text]
serviceIds = forall a. Monoid a => a
Prelude.mempty
}
deleteVpcEndpointServiceConfigurations_dryRun :: Lens.Lens' DeleteVpcEndpointServiceConfigurations (Prelude.Maybe Prelude.Bool)
deleteVpcEndpointServiceConfigurations_dryRun :: Lens' DeleteVpcEndpointServiceConfigurations (Maybe Bool)
deleteVpcEndpointServiceConfigurations_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcEndpointServiceConfigurations' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DeleteVpcEndpointServiceConfigurations' :: DeleteVpcEndpointServiceConfigurations -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DeleteVpcEndpointServiceConfigurations
s@DeleteVpcEndpointServiceConfigurations' {} Maybe Bool
a -> DeleteVpcEndpointServiceConfigurations
s {$sel:dryRun:DeleteVpcEndpointServiceConfigurations' :: Maybe Bool
dryRun = Maybe Bool
a} :: DeleteVpcEndpointServiceConfigurations)
deleteVpcEndpointServiceConfigurations_serviceIds :: Lens.Lens' DeleteVpcEndpointServiceConfigurations [Prelude.Text]
deleteVpcEndpointServiceConfigurations_serviceIds :: Lens' DeleteVpcEndpointServiceConfigurations [Text]
deleteVpcEndpointServiceConfigurations_serviceIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcEndpointServiceConfigurations' {[Text]
serviceIds :: [Text]
$sel:serviceIds:DeleteVpcEndpointServiceConfigurations' :: DeleteVpcEndpointServiceConfigurations -> [Text]
serviceIds} -> [Text]
serviceIds) (\s :: DeleteVpcEndpointServiceConfigurations
s@DeleteVpcEndpointServiceConfigurations' {} [Text]
a -> DeleteVpcEndpointServiceConfigurations
s {$sel:serviceIds:DeleteVpcEndpointServiceConfigurations' :: [Text]
serviceIds = [Text]
a} :: DeleteVpcEndpointServiceConfigurations) 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
DeleteVpcEndpointServiceConfigurations
where
type
AWSResponse
DeleteVpcEndpointServiceConfigurations =
DeleteVpcEndpointServiceConfigurationsResponse
request :: (Service -> Service)
-> DeleteVpcEndpointServiceConfigurations
-> Request DeleteVpcEndpointServiceConfigurations
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 DeleteVpcEndpointServiceConfigurations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DeleteVpcEndpointServiceConfigurations)))
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 -> DeleteVpcEndpointServiceConfigurationsResponse
DeleteVpcEndpointServiceConfigurationsResponse'
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
DeleteVpcEndpointServiceConfigurations
where
hashWithSalt :: Int -> DeleteVpcEndpointServiceConfigurations -> Int
hashWithSalt
Int
_salt
DeleteVpcEndpointServiceConfigurations' {[Text]
Maybe Bool
serviceIds :: [Text]
dryRun :: Maybe Bool
$sel:serviceIds:DeleteVpcEndpointServiceConfigurations' :: DeleteVpcEndpointServiceConfigurations -> [Text]
$sel:dryRun:DeleteVpcEndpointServiceConfigurations' :: DeleteVpcEndpointServiceConfigurations -> 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]
serviceIds
instance
Prelude.NFData
DeleteVpcEndpointServiceConfigurations
where
rnf :: DeleteVpcEndpointServiceConfigurations -> ()
rnf DeleteVpcEndpointServiceConfigurations' {[Text]
Maybe Bool
serviceIds :: [Text]
dryRun :: Maybe Bool
$sel:serviceIds:DeleteVpcEndpointServiceConfigurations' :: DeleteVpcEndpointServiceConfigurations -> [Text]
$sel:dryRun:DeleteVpcEndpointServiceConfigurations' :: DeleteVpcEndpointServiceConfigurations -> 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]
serviceIds
instance
Data.ToHeaders
DeleteVpcEndpointServiceConfigurations
where
toHeaders :: DeleteVpcEndpointServiceConfigurations -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance
Data.ToPath
DeleteVpcEndpointServiceConfigurations
where
toPath :: DeleteVpcEndpointServiceConfigurations -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
DeleteVpcEndpointServiceConfigurations
where
toQuery :: DeleteVpcEndpointServiceConfigurations -> QueryString
toQuery DeleteVpcEndpointServiceConfigurations' {[Text]
Maybe Bool
serviceIds :: [Text]
dryRun :: Maybe Bool
$sel:serviceIds:DeleteVpcEndpointServiceConfigurations' :: DeleteVpcEndpointServiceConfigurations -> [Text]
$sel:dryRun:DeleteVpcEndpointServiceConfigurations' :: DeleteVpcEndpointServiceConfigurations -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DeleteVpcEndpointServiceConfigurations" ::
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
"ServiceId" [Text]
serviceIds
]
data DeleteVpcEndpointServiceConfigurationsResponse = DeleteVpcEndpointServiceConfigurationsResponse'
{
DeleteVpcEndpointServiceConfigurationsResponse
-> Maybe [UnsuccessfulItem]
unsuccessful :: Prelude.Maybe [UnsuccessfulItem],
DeleteVpcEndpointServiceConfigurationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteVpcEndpointServiceConfigurationsResponse
-> DeleteVpcEndpointServiceConfigurationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVpcEndpointServiceConfigurationsResponse
-> DeleteVpcEndpointServiceConfigurationsResponse -> Bool
$c/= :: DeleteVpcEndpointServiceConfigurationsResponse
-> DeleteVpcEndpointServiceConfigurationsResponse -> Bool
== :: DeleteVpcEndpointServiceConfigurationsResponse
-> DeleteVpcEndpointServiceConfigurationsResponse -> Bool
$c== :: DeleteVpcEndpointServiceConfigurationsResponse
-> DeleteVpcEndpointServiceConfigurationsResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVpcEndpointServiceConfigurationsResponse]
ReadPrec DeleteVpcEndpointServiceConfigurationsResponse
Int -> ReadS DeleteVpcEndpointServiceConfigurationsResponse
ReadS [DeleteVpcEndpointServiceConfigurationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVpcEndpointServiceConfigurationsResponse]
$creadListPrec :: ReadPrec [DeleteVpcEndpointServiceConfigurationsResponse]
readPrec :: ReadPrec DeleteVpcEndpointServiceConfigurationsResponse
$creadPrec :: ReadPrec DeleteVpcEndpointServiceConfigurationsResponse
readList :: ReadS [DeleteVpcEndpointServiceConfigurationsResponse]
$creadList :: ReadS [DeleteVpcEndpointServiceConfigurationsResponse]
readsPrec :: Int -> ReadS DeleteVpcEndpointServiceConfigurationsResponse
$creadsPrec :: Int -> ReadS DeleteVpcEndpointServiceConfigurationsResponse
Prelude.Read, Int -> DeleteVpcEndpointServiceConfigurationsResponse -> ShowS
[DeleteVpcEndpointServiceConfigurationsResponse] -> ShowS
DeleteVpcEndpointServiceConfigurationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVpcEndpointServiceConfigurationsResponse] -> ShowS
$cshowList :: [DeleteVpcEndpointServiceConfigurationsResponse] -> ShowS
show :: DeleteVpcEndpointServiceConfigurationsResponse -> String
$cshow :: DeleteVpcEndpointServiceConfigurationsResponse -> String
showsPrec :: Int -> DeleteVpcEndpointServiceConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> DeleteVpcEndpointServiceConfigurationsResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteVpcEndpointServiceConfigurationsResponse x
-> DeleteVpcEndpointServiceConfigurationsResponse
forall x.
DeleteVpcEndpointServiceConfigurationsResponse
-> Rep DeleteVpcEndpointServiceConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVpcEndpointServiceConfigurationsResponse x
-> DeleteVpcEndpointServiceConfigurationsResponse
$cfrom :: forall x.
DeleteVpcEndpointServiceConfigurationsResponse
-> Rep DeleteVpcEndpointServiceConfigurationsResponse x
Prelude.Generic)
newDeleteVpcEndpointServiceConfigurationsResponse ::
Prelude.Int ->
DeleteVpcEndpointServiceConfigurationsResponse
newDeleteVpcEndpointServiceConfigurationsResponse :: Int -> DeleteVpcEndpointServiceConfigurationsResponse
newDeleteVpcEndpointServiceConfigurationsResponse
Int
pHttpStatus_ =
DeleteVpcEndpointServiceConfigurationsResponse'
{ $sel:unsuccessful:DeleteVpcEndpointServiceConfigurationsResponse' :: Maybe [UnsuccessfulItem]
unsuccessful =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteVpcEndpointServiceConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteVpcEndpointServiceConfigurationsResponse_unsuccessful :: Lens.Lens' DeleteVpcEndpointServiceConfigurationsResponse (Prelude.Maybe [UnsuccessfulItem])
deleteVpcEndpointServiceConfigurationsResponse_unsuccessful :: Lens'
DeleteVpcEndpointServiceConfigurationsResponse
(Maybe [UnsuccessfulItem])
deleteVpcEndpointServiceConfigurationsResponse_unsuccessful = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcEndpointServiceConfigurationsResponse' {Maybe [UnsuccessfulItem]
unsuccessful :: Maybe [UnsuccessfulItem]
$sel:unsuccessful:DeleteVpcEndpointServiceConfigurationsResponse' :: DeleteVpcEndpointServiceConfigurationsResponse
-> Maybe [UnsuccessfulItem]
unsuccessful} -> Maybe [UnsuccessfulItem]
unsuccessful) (\s :: DeleteVpcEndpointServiceConfigurationsResponse
s@DeleteVpcEndpointServiceConfigurationsResponse' {} Maybe [UnsuccessfulItem]
a -> DeleteVpcEndpointServiceConfigurationsResponse
s {$sel:unsuccessful:DeleteVpcEndpointServiceConfigurationsResponse' :: Maybe [UnsuccessfulItem]
unsuccessful = Maybe [UnsuccessfulItem]
a} :: DeleteVpcEndpointServiceConfigurationsResponse) 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
deleteVpcEndpointServiceConfigurationsResponse_httpStatus :: Lens.Lens' DeleteVpcEndpointServiceConfigurationsResponse Prelude.Int
deleteVpcEndpointServiceConfigurationsResponse_httpStatus :: Lens' DeleteVpcEndpointServiceConfigurationsResponse Int
deleteVpcEndpointServiceConfigurationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcEndpointServiceConfigurationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteVpcEndpointServiceConfigurationsResponse' :: DeleteVpcEndpointServiceConfigurationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteVpcEndpointServiceConfigurationsResponse
s@DeleteVpcEndpointServiceConfigurationsResponse' {} Int
a -> DeleteVpcEndpointServiceConfigurationsResponse
s {$sel:httpStatus:DeleteVpcEndpointServiceConfigurationsResponse' :: Int
httpStatus = Int
a} :: DeleteVpcEndpointServiceConfigurationsResponse)
instance
Prelude.NFData
DeleteVpcEndpointServiceConfigurationsResponse
where
rnf :: DeleteVpcEndpointServiceConfigurationsResponse -> ()
rnf
DeleteVpcEndpointServiceConfigurationsResponse' {Int
Maybe [UnsuccessfulItem]
httpStatus :: Int
unsuccessful :: Maybe [UnsuccessfulItem]
$sel:httpStatus:DeleteVpcEndpointServiceConfigurationsResponse' :: DeleteVpcEndpointServiceConfigurationsResponse -> Int
$sel:unsuccessful:DeleteVpcEndpointServiceConfigurationsResponse' :: DeleteVpcEndpointServiceConfigurationsResponse
-> 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