{-# 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.Route53Resolver.DeleteFirewallDomainList
(
DeleteFirewallDomainList (..),
newDeleteFirewallDomainList,
deleteFirewallDomainList_firewallDomainListId,
DeleteFirewallDomainListResponse (..),
newDeleteFirewallDomainListResponse,
deleteFirewallDomainListResponse_firewallDomainList,
deleteFirewallDomainListResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Route53Resolver.Types
data DeleteFirewallDomainList = DeleteFirewallDomainList'
{
DeleteFirewallDomainList -> Text
firewallDomainListId :: Prelude.Text
}
deriving (DeleteFirewallDomainList -> DeleteFirewallDomainList -> Bool
(DeleteFirewallDomainList -> DeleteFirewallDomainList -> Bool)
-> (DeleteFirewallDomainList -> DeleteFirewallDomainList -> Bool)
-> Eq DeleteFirewallDomainList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFirewallDomainList -> DeleteFirewallDomainList -> Bool
$c/= :: DeleteFirewallDomainList -> DeleteFirewallDomainList -> Bool
== :: DeleteFirewallDomainList -> DeleteFirewallDomainList -> Bool
$c== :: DeleteFirewallDomainList -> DeleteFirewallDomainList -> Bool
Prelude.Eq, ReadPrec [DeleteFirewallDomainList]
ReadPrec DeleteFirewallDomainList
Int -> ReadS DeleteFirewallDomainList
ReadS [DeleteFirewallDomainList]
(Int -> ReadS DeleteFirewallDomainList)
-> ReadS [DeleteFirewallDomainList]
-> ReadPrec DeleteFirewallDomainList
-> ReadPrec [DeleteFirewallDomainList]
-> Read DeleteFirewallDomainList
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFirewallDomainList]
$creadListPrec :: ReadPrec [DeleteFirewallDomainList]
readPrec :: ReadPrec DeleteFirewallDomainList
$creadPrec :: ReadPrec DeleteFirewallDomainList
readList :: ReadS [DeleteFirewallDomainList]
$creadList :: ReadS [DeleteFirewallDomainList]
readsPrec :: Int -> ReadS DeleteFirewallDomainList
$creadsPrec :: Int -> ReadS DeleteFirewallDomainList
Prelude.Read, Int -> DeleteFirewallDomainList -> ShowS
[DeleteFirewallDomainList] -> ShowS
DeleteFirewallDomainList -> String
(Int -> DeleteFirewallDomainList -> ShowS)
-> (DeleteFirewallDomainList -> String)
-> ([DeleteFirewallDomainList] -> ShowS)
-> Show DeleteFirewallDomainList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFirewallDomainList] -> ShowS
$cshowList :: [DeleteFirewallDomainList] -> ShowS
show :: DeleteFirewallDomainList -> String
$cshow :: DeleteFirewallDomainList -> String
showsPrec :: Int -> DeleteFirewallDomainList -> ShowS
$cshowsPrec :: Int -> DeleteFirewallDomainList -> ShowS
Prelude.Show, (forall x.
DeleteFirewallDomainList -> Rep DeleteFirewallDomainList x)
-> (forall x.
Rep DeleteFirewallDomainList x -> DeleteFirewallDomainList)
-> Generic DeleteFirewallDomainList
forall x.
Rep DeleteFirewallDomainList x -> DeleteFirewallDomainList
forall x.
DeleteFirewallDomainList -> Rep DeleteFirewallDomainList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteFirewallDomainList x -> DeleteFirewallDomainList
$cfrom :: forall x.
DeleteFirewallDomainList -> Rep DeleteFirewallDomainList x
Prelude.Generic)
newDeleteFirewallDomainList ::
Prelude.Text ->
DeleteFirewallDomainList
newDeleteFirewallDomainList :: Text -> DeleteFirewallDomainList
newDeleteFirewallDomainList Text
pFirewallDomainListId_ =
DeleteFirewallDomainList' :: Text -> DeleteFirewallDomainList
DeleteFirewallDomainList'
{ $sel:firewallDomainListId:DeleteFirewallDomainList' :: Text
firewallDomainListId =
Text
pFirewallDomainListId_
}
deleteFirewallDomainList_firewallDomainListId :: Lens.Lens' DeleteFirewallDomainList Prelude.Text
deleteFirewallDomainList_firewallDomainListId :: (Text -> f Text)
-> DeleteFirewallDomainList -> f DeleteFirewallDomainList
deleteFirewallDomainList_firewallDomainListId = (DeleteFirewallDomainList -> Text)
-> (DeleteFirewallDomainList -> Text -> DeleteFirewallDomainList)
-> Lens DeleteFirewallDomainList DeleteFirewallDomainList Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFirewallDomainList' {Text
firewallDomainListId :: Text
$sel:firewallDomainListId:DeleteFirewallDomainList' :: DeleteFirewallDomainList -> Text
firewallDomainListId} -> Text
firewallDomainListId) (\s :: DeleteFirewallDomainList
s@DeleteFirewallDomainList' {} Text
a -> DeleteFirewallDomainList
s {$sel:firewallDomainListId:DeleteFirewallDomainList' :: Text
firewallDomainListId = Text
a} :: DeleteFirewallDomainList)
instance Core.AWSRequest DeleteFirewallDomainList where
type
AWSResponse DeleteFirewallDomainList =
DeleteFirewallDomainListResponse
request :: DeleteFirewallDomainList -> Request DeleteFirewallDomainList
request = Service
-> DeleteFirewallDomainList -> Request DeleteFirewallDomainList
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteFirewallDomainList
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteFirewallDomainList)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteFirewallDomainList))
-> Logger
-> Service
-> Proxy DeleteFirewallDomainList
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteFirewallDomainList)))
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 FirewallDomainList -> Int -> DeleteFirewallDomainListResponse
DeleteFirewallDomainListResponse'
(Maybe FirewallDomainList
-> Int -> DeleteFirewallDomainListResponse)
-> Either String (Maybe FirewallDomainList)
-> Either String (Int -> DeleteFirewallDomainListResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe FirewallDomainList)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FirewallDomainList")
Either String (Int -> DeleteFirewallDomainListResponse)
-> Either String Int
-> Either String DeleteFirewallDomainListResponse
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 DeleteFirewallDomainList
instance Prelude.NFData DeleteFirewallDomainList
instance Core.ToHeaders DeleteFirewallDomainList where
toHeaders :: DeleteFirewallDomainList -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteFirewallDomainList -> 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
"Route53Resolver.DeleteFirewallDomainList" ::
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 DeleteFirewallDomainList where
toJSON :: DeleteFirewallDomainList -> Value
toJSON DeleteFirewallDomainList' {Text
firewallDomainListId :: Text
$sel:firewallDomainListId:DeleteFirewallDomainList' :: DeleteFirewallDomainList -> 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
"FirewallDomainListId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
firewallDomainListId
)
]
)
instance Core.ToPath DeleteFirewallDomainList where
toPath :: DeleteFirewallDomainList -> ByteString
toPath = ByteString -> DeleteFirewallDomainList -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteFirewallDomainList where
toQuery :: DeleteFirewallDomainList -> QueryString
toQuery = QueryString -> DeleteFirewallDomainList -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteFirewallDomainListResponse = DeleteFirewallDomainListResponse'
{
DeleteFirewallDomainListResponse -> Maybe FirewallDomainList
firewallDomainList :: Prelude.Maybe FirewallDomainList,
DeleteFirewallDomainListResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteFirewallDomainListResponse
-> DeleteFirewallDomainListResponse -> Bool
(DeleteFirewallDomainListResponse
-> DeleteFirewallDomainListResponse -> Bool)
-> (DeleteFirewallDomainListResponse
-> DeleteFirewallDomainListResponse -> Bool)
-> Eq DeleteFirewallDomainListResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFirewallDomainListResponse
-> DeleteFirewallDomainListResponse -> Bool
$c/= :: DeleteFirewallDomainListResponse
-> DeleteFirewallDomainListResponse -> Bool
== :: DeleteFirewallDomainListResponse
-> DeleteFirewallDomainListResponse -> Bool
$c== :: DeleteFirewallDomainListResponse
-> DeleteFirewallDomainListResponse -> Bool
Prelude.Eq, ReadPrec [DeleteFirewallDomainListResponse]
ReadPrec DeleteFirewallDomainListResponse
Int -> ReadS DeleteFirewallDomainListResponse
ReadS [DeleteFirewallDomainListResponse]
(Int -> ReadS DeleteFirewallDomainListResponse)
-> ReadS [DeleteFirewallDomainListResponse]
-> ReadPrec DeleteFirewallDomainListResponse
-> ReadPrec [DeleteFirewallDomainListResponse]
-> Read DeleteFirewallDomainListResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFirewallDomainListResponse]
$creadListPrec :: ReadPrec [DeleteFirewallDomainListResponse]
readPrec :: ReadPrec DeleteFirewallDomainListResponse
$creadPrec :: ReadPrec DeleteFirewallDomainListResponse
readList :: ReadS [DeleteFirewallDomainListResponse]
$creadList :: ReadS [DeleteFirewallDomainListResponse]
readsPrec :: Int -> ReadS DeleteFirewallDomainListResponse
$creadsPrec :: Int -> ReadS DeleteFirewallDomainListResponse
Prelude.Read, Int -> DeleteFirewallDomainListResponse -> ShowS
[DeleteFirewallDomainListResponse] -> ShowS
DeleteFirewallDomainListResponse -> String
(Int -> DeleteFirewallDomainListResponse -> ShowS)
-> (DeleteFirewallDomainListResponse -> String)
-> ([DeleteFirewallDomainListResponse] -> ShowS)
-> Show DeleteFirewallDomainListResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFirewallDomainListResponse] -> ShowS
$cshowList :: [DeleteFirewallDomainListResponse] -> ShowS
show :: DeleteFirewallDomainListResponse -> String
$cshow :: DeleteFirewallDomainListResponse -> String
showsPrec :: Int -> DeleteFirewallDomainListResponse -> ShowS
$cshowsPrec :: Int -> DeleteFirewallDomainListResponse -> ShowS
Prelude.Show, (forall x.
DeleteFirewallDomainListResponse
-> Rep DeleteFirewallDomainListResponse x)
-> (forall x.
Rep DeleteFirewallDomainListResponse x
-> DeleteFirewallDomainListResponse)
-> Generic DeleteFirewallDomainListResponse
forall x.
Rep DeleteFirewallDomainListResponse x
-> DeleteFirewallDomainListResponse
forall x.
DeleteFirewallDomainListResponse
-> Rep DeleteFirewallDomainListResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteFirewallDomainListResponse x
-> DeleteFirewallDomainListResponse
$cfrom :: forall x.
DeleteFirewallDomainListResponse
-> Rep DeleteFirewallDomainListResponse x
Prelude.Generic)
newDeleteFirewallDomainListResponse ::
Prelude.Int ->
DeleteFirewallDomainListResponse
newDeleteFirewallDomainListResponse :: Int -> DeleteFirewallDomainListResponse
newDeleteFirewallDomainListResponse Int
pHttpStatus_ =
DeleteFirewallDomainListResponse' :: Maybe FirewallDomainList -> Int -> DeleteFirewallDomainListResponse
DeleteFirewallDomainListResponse'
{ $sel:firewallDomainList:DeleteFirewallDomainListResponse' :: Maybe FirewallDomainList
firewallDomainList =
Maybe FirewallDomainList
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteFirewallDomainListResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteFirewallDomainListResponse_firewallDomainList :: Lens.Lens' DeleteFirewallDomainListResponse (Prelude.Maybe FirewallDomainList)
deleteFirewallDomainListResponse_firewallDomainList :: (Maybe FirewallDomainList -> f (Maybe FirewallDomainList))
-> DeleteFirewallDomainListResponse
-> f DeleteFirewallDomainListResponse
deleteFirewallDomainListResponse_firewallDomainList = (DeleteFirewallDomainListResponse -> Maybe FirewallDomainList)
-> (DeleteFirewallDomainListResponse
-> Maybe FirewallDomainList -> DeleteFirewallDomainListResponse)
-> Lens
DeleteFirewallDomainListResponse
DeleteFirewallDomainListResponse
(Maybe FirewallDomainList)
(Maybe FirewallDomainList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFirewallDomainListResponse' {Maybe FirewallDomainList
firewallDomainList :: Maybe FirewallDomainList
$sel:firewallDomainList:DeleteFirewallDomainListResponse' :: DeleteFirewallDomainListResponse -> Maybe FirewallDomainList
firewallDomainList} -> Maybe FirewallDomainList
firewallDomainList) (\s :: DeleteFirewallDomainListResponse
s@DeleteFirewallDomainListResponse' {} Maybe FirewallDomainList
a -> DeleteFirewallDomainListResponse
s {$sel:firewallDomainList:DeleteFirewallDomainListResponse' :: Maybe FirewallDomainList
firewallDomainList = Maybe FirewallDomainList
a} :: DeleteFirewallDomainListResponse)
deleteFirewallDomainListResponse_httpStatus :: Lens.Lens' DeleteFirewallDomainListResponse Prelude.Int
deleteFirewallDomainListResponse_httpStatus :: (Int -> f Int)
-> DeleteFirewallDomainListResponse
-> f DeleteFirewallDomainListResponse
deleteFirewallDomainListResponse_httpStatus = (DeleteFirewallDomainListResponse -> Int)
-> (DeleteFirewallDomainListResponse
-> Int -> DeleteFirewallDomainListResponse)
-> Lens
DeleteFirewallDomainListResponse
DeleteFirewallDomainListResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFirewallDomainListResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteFirewallDomainListResponse' :: DeleteFirewallDomainListResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteFirewallDomainListResponse
s@DeleteFirewallDomainListResponse' {} Int
a -> DeleteFirewallDomainListResponse
s {$sel:httpStatus:DeleteFirewallDomainListResponse' :: Int
httpStatus = Int
a} :: DeleteFirewallDomainListResponse)
instance
Prelude.NFData
DeleteFirewallDomainListResponse