{-# 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.RDS.DeleteCustomAvailabilityZone
(
DeleteCustomAvailabilityZone (..),
newDeleteCustomAvailabilityZone,
deleteCustomAvailabilityZone_customAvailabilityZoneId,
DeleteCustomAvailabilityZoneResponse (..),
newDeleteCustomAvailabilityZoneResponse,
deleteCustomAvailabilityZoneResponse_customAvailabilityZone,
deleteCustomAvailabilityZoneResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteCustomAvailabilityZone = DeleteCustomAvailabilityZone'
{
DeleteCustomAvailabilityZone -> Text
customAvailabilityZoneId :: Prelude.Text
}
deriving (DeleteCustomAvailabilityZone
-> DeleteCustomAvailabilityZone -> Bool
(DeleteCustomAvailabilityZone
-> DeleteCustomAvailabilityZone -> Bool)
-> (DeleteCustomAvailabilityZone
-> DeleteCustomAvailabilityZone -> Bool)
-> Eq DeleteCustomAvailabilityZone
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCustomAvailabilityZone
-> DeleteCustomAvailabilityZone -> Bool
$c/= :: DeleteCustomAvailabilityZone
-> DeleteCustomAvailabilityZone -> Bool
== :: DeleteCustomAvailabilityZone
-> DeleteCustomAvailabilityZone -> Bool
$c== :: DeleteCustomAvailabilityZone
-> DeleteCustomAvailabilityZone -> Bool
Prelude.Eq, ReadPrec [DeleteCustomAvailabilityZone]
ReadPrec DeleteCustomAvailabilityZone
Int -> ReadS DeleteCustomAvailabilityZone
ReadS [DeleteCustomAvailabilityZone]
(Int -> ReadS DeleteCustomAvailabilityZone)
-> ReadS [DeleteCustomAvailabilityZone]
-> ReadPrec DeleteCustomAvailabilityZone
-> ReadPrec [DeleteCustomAvailabilityZone]
-> Read DeleteCustomAvailabilityZone
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteCustomAvailabilityZone]
$creadListPrec :: ReadPrec [DeleteCustomAvailabilityZone]
readPrec :: ReadPrec DeleteCustomAvailabilityZone
$creadPrec :: ReadPrec DeleteCustomAvailabilityZone
readList :: ReadS [DeleteCustomAvailabilityZone]
$creadList :: ReadS [DeleteCustomAvailabilityZone]
readsPrec :: Int -> ReadS DeleteCustomAvailabilityZone
$creadsPrec :: Int -> ReadS DeleteCustomAvailabilityZone
Prelude.Read, Int -> DeleteCustomAvailabilityZone -> ShowS
[DeleteCustomAvailabilityZone] -> ShowS
DeleteCustomAvailabilityZone -> String
(Int -> DeleteCustomAvailabilityZone -> ShowS)
-> (DeleteCustomAvailabilityZone -> String)
-> ([DeleteCustomAvailabilityZone] -> ShowS)
-> Show DeleteCustomAvailabilityZone
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCustomAvailabilityZone] -> ShowS
$cshowList :: [DeleteCustomAvailabilityZone] -> ShowS
show :: DeleteCustomAvailabilityZone -> String
$cshow :: DeleteCustomAvailabilityZone -> String
showsPrec :: Int -> DeleteCustomAvailabilityZone -> ShowS
$cshowsPrec :: Int -> DeleteCustomAvailabilityZone -> ShowS
Prelude.Show, (forall x.
DeleteCustomAvailabilityZone -> Rep DeleteCustomAvailabilityZone x)
-> (forall x.
Rep DeleteCustomAvailabilityZone x -> DeleteCustomAvailabilityZone)
-> Generic DeleteCustomAvailabilityZone
forall x.
Rep DeleteCustomAvailabilityZone x -> DeleteCustomAvailabilityZone
forall x.
DeleteCustomAvailabilityZone -> Rep DeleteCustomAvailabilityZone x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteCustomAvailabilityZone x -> DeleteCustomAvailabilityZone
$cfrom :: forall x.
DeleteCustomAvailabilityZone -> Rep DeleteCustomAvailabilityZone x
Prelude.Generic)
newDeleteCustomAvailabilityZone ::
Prelude.Text ->
DeleteCustomAvailabilityZone
newDeleteCustomAvailabilityZone :: Text -> DeleteCustomAvailabilityZone
newDeleteCustomAvailabilityZone
Text
pCustomAvailabilityZoneId_ =
DeleteCustomAvailabilityZone' :: Text -> DeleteCustomAvailabilityZone
DeleteCustomAvailabilityZone'
{ $sel:customAvailabilityZoneId:DeleteCustomAvailabilityZone' :: Text
customAvailabilityZoneId =
Text
pCustomAvailabilityZoneId_
}
deleteCustomAvailabilityZone_customAvailabilityZoneId :: Lens.Lens' DeleteCustomAvailabilityZone Prelude.Text
deleteCustomAvailabilityZone_customAvailabilityZoneId :: (Text -> f Text)
-> DeleteCustomAvailabilityZone -> f DeleteCustomAvailabilityZone
deleteCustomAvailabilityZone_customAvailabilityZoneId = (DeleteCustomAvailabilityZone -> Text)
-> (DeleteCustomAvailabilityZone
-> Text -> DeleteCustomAvailabilityZone)
-> Lens
DeleteCustomAvailabilityZone DeleteCustomAvailabilityZone Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCustomAvailabilityZone' {Text
customAvailabilityZoneId :: Text
$sel:customAvailabilityZoneId:DeleteCustomAvailabilityZone' :: DeleteCustomAvailabilityZone -> Text
customAvailabilityZoneId} -> Text
customAvailabilityZoneId) (\s :: DeleteCustomAvailabilityZone
s@DeleteCustomAvailabilityZone' {} Text
a -> DeleteCustomAvailabilityZone
s {$sel:customAvailabilityZoneId:DeleteCustomAvailabilityZone' :: Text
customAvailabilityZoneId = Text
a} :: DeleteCustomAvailabilityZone)
instance Core.AWSRequest DeleteCustomAvailabilityZone where
type
AWSResponse DeleteCustomAvailabilityZone =
DeleteCustomAvailabilityZoneResponse
request :: DeleteCustomAvailabilityZone
-> Request DeleteCustomAvailabilityZone
request = Service
-> DeleteCustomAvailabilityZone
-> Request DeleteCustomAvailabilityZone
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteCustomAvailabilityZone
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteCustomAvailabilityZone)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeleteCustomAvailabilityZone))
-> Logger
-> Service
-> Proxy DeleteCustomAvailabilityZone
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteCustomAvailabilityZone)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DeleteCustomAvailabilityZoneResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe CustomAvailabilityZone
-> Int -> DeleteCustomAvailabilityZoneResponse
DeleteCustomAvailabilityZoneResponse'
(Maybe CustomAvailabilityZone
-> Int -> DeleteCustomAvailabilityZoneResponse)
-> Either String (Maybe CustomAvailabilityZone)
-> Either String (Int -> DeleteCustomAvailabilityZoneResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe CustomAvailabilityZone)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CustomAvailabilityZone")
Either String (Int -> DeleteCustomAvailabilityZoneResponse)
-> Either String Int
-> Either String DeleteCustomAvailabilityZoneResponse
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
DeleteCustomAvailabilityZone
instance Prelude.NFData DeleteCustomAvailabilityZone
instance Core.ToHeaders DeleteCustomAvailabilityZone where
toHeaders :: DeleteCustomAvailabilityZone -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteCustomAvailabilityZone -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteCustomAvailabilityZone where
toPath :: DeleteCustomAvailabilityZone -> ByteString
toPath = ByteString -> DeleteCustomAvailabilityZone -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteCustomAvailabilityZone where
toQuery :: DeleteCustomAvailabilityZone -> QueryString
toQuery DeleteCustomAvailabilityZone' {Text
customAvailabilityZoneId :: Text
$sel:customAvailabilityZoneId:DeleteCustomAvailabilityZone' :: DeleteCustomAvailabilityZone -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DeleteCustomAvailabilityZone" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"CustomAvailabilityZoneId"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
customAvailabilityZoneId
]
data DeleteCustomAvailabilityZoneResponse = DeleteCustomAvailabilityZoneResponse'
{ DeleteCustomAvailabilityZoneResponse
-> Maybe CustomAvailabilityZone
customAvailabilityZone :: Prelude.Maybe CustomAvailabilityZone,
DeleteCustomAvailabilityZoneResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteCustomAvailabilityZoneResponse
-> DeleteCustomAvailabilityZoneResponse -> Bool
(DeleteCustomAvailabilityZoneResponse
-> DeleteCustomAvailabilityZoneResponse -> Bool)
-> (DeleteCustomAvailabilityZoneResponse
-> DeleteCustomAvailabilityZoneResponse -> Bool)
-> Eq DeleteCustomAvailabilityZoneResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCustomAvailabilityZoneResponse
-> DeleteCustomAvailabilityZoneResponse -> Bool
$c/= :: DeleteCustomAvailabilityZoneResponse
-> DeleteCustomAvailabilityZoneResponse -> Bool
== :: DeleteCustomAvailabilityZoneResponse
-> DeleteCustomAvailabilityZoneResponse -> Bool
$c== :: DeleteCustomAvailabilityZoneResponse
-> DeleteCustomAvailabilityZoneResponse -> Bool
Prelude.Eq, Int -> DeleteCustomAvailabilityZoneResponse -> ShowS
[DeleteCustomAvailabilityZoneResponse] -> ShowS
DeleteCustomAvailabilityZoneResponse -> String
(Int -> DeleteCustomAvailabilityZoneResponse -> ShowS)
-> (DeleteCustomAvailabilityZoneResponse -> String)
-> ([DeleteCustomAvailabilityZoneResponse] -> ShowS)
-> Show DeleteCustomAvailabilityZoneResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCustomAvailabilityZoneResponse] -> ShowS
$cshowList :: [DeleteCustomAvailabilityZoneResponse] -> ShowS
show :: DeleteCustomAvailabilityZoneResponse -> String
$cshow :: DeleteCustomAvailabilityZoneResponse -> String
showsPrec :: Int -> DeleteCustomAvailabilityZoneResponse -> ShowS
$cshowsPrec :: Int -> DeleteCustomAvailabilityZoneResponse -> ShowS
Prelude.Show, (forall x.
DeleteCustomAvailabilityZoneResponse
-> Rep DeleteCustomAvailabilityZoneResponse x)
-> (forall x.
Rep DeleteCustomAvailabilityZoneResponse x
-> DeleteCustomAvailabilityZoneResponse)
-> Generic DeleteCustomAvailabilityZoneResponse
forall x.
Rep DeleteCustomAvailabilityZoneResponse x
-> DeleteCustomAvailabilityZoneResponse
forall x.
DeleteCustomAvailabilityZoneResponse
-> Rep DeleteCustomAvailabilityZoneResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteCustomAvailabilityZoneResponse x
-> DeleteCustomAvailabilityZoneResponse
$cfrom :: forall x.
DeleteCustomAvailabilityZoneResponse
-> Rep DeleteCustomAvailabilityZoneResponse x
Prelude.Generic)
newDeleteCustomAvailabilityZoneResponse ::
Prelude.Int ->
DeleteCustomAvailabilityZoneResponse
newDeleteCustomAvailabilityZoneResponse :: Int -> DeleteCustomAvailabilityZoneResponse
newDeleteCustomAvailabilityZoneResponse Int
pHttpStatus_ =
DeleteCustomAvailabilityZoneResponse' :: Maybe CustomAvailabilityZone
-> Int -> DeleteCustomAvailabilityZoneResponse
DeleteCustomAvailabilityZoneResponse'
{ $sel:customAvailabilityZone:DeleteCustomAvailabilityZoneResponse' :: Maybe CustomAvailabilityZone
customAvailabilityZone =
Maybe CustomAvailabilityZone
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteCustomAvailabilityZoneResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteCustomAvailabilityZoneResponse_customAvailabilityZone :: Lens.Lens' DeleteCustomAvailabilityZoneResponse (Prelude.Maybe CustomAvailabilityZone)
deleteCustomAvailabilityZoneResponse_customAvailabilityZone :: (Maybe CustomAvailabilityZone -> f (Maybe CustomAvailabilityZone))
-> DeleteCustomAvailabilityZoneResponse
-> f DeleteCustomAvailabilityZoneResponse
deleteCustomAvailabilityZoneResponse_customAvailabilityZone = (DeleteCustomAvailabilityZoneResponse
-> Maybe CustomAvailabilityZone)
-> (DeleteCustomAvailabilityZoneResponse
-> Maybe CustomAvailabilityZone
-> DeleteCustomAvailabilityZoneResponse)
-> Lens
DeleteCustomAvailabilityZoneResponse
DeleteCustomAvailabilityZoneResponse
(Maybe CustomAvailabilityZone)
(Maybe CustomAvailabilityZone)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCustomAvailabilityZoneResponse' {Maybe CustomAvailabilityZone
customAvailabilityZone :: Maybe CustomAvailabilityZone
$sel:customAvailabilityZone:DeleteCustomAvailabilityZoneResponse' :: DeleteCustomAvailabilityZoneResponse
-> Maybe CustomAvailabilityZone
customAvailabilityZone} -> Maybe CustomAvailabilityZone
customAvailabilityZone) (\s :: DeleteCustomAvailabilityZoneResponse
s@DeleteCustomAvailabilityZoneResponse' {} Maybe CustomAvailabilityZone
a -> DeleteCustomAvailabilityZoneResponse
s {$sel:customAvailabilityZone:DeleteCustomAvailabilityZoneResponse' :: Maybe CustomAvailabilityZone
customAvailabilityZone = Maybe CustomAvailabilityZone
a} :: DeleteCustomAvailabilityZoneResponse)
deleteCustomAvailabilityZoneResponse_httpStatus :: Lens.Lens' DeleteCustomAvailabilityZoneResponse Prelude.Int
deleteCustomAvailabilityZoneResponse_httpStatus :: (Int -> f Int)
-> DeleteCustomAvailabilityZoneResponse
-> f DeleteCustomAvailabilityZoneResponse
deleteCustomAvailabilityZoneResponse_httpStatus = (DeleteCustomAvailabilityZoneResponse -> Int)
-> (DeleteCustomAvailabilityZoneResponse
-> Int -> DeleteCustomAvailabilityZoneResponse)
-> Lens
DeleteCustomAvailabilityZoneResponse
DeleteCustomAvailabilityZoneResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCustomAvailabilityZoneResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteCustomAvailabilityZoneResponse' :: DeleteCustomAvailabilityZoneResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteCustomAvailabilityZoneResponse
s@DeleteCustomAvailabilityZoneResponse' {} Int
a -> DeleteCustomAvailabilityZoneResponse
s {$sel:httpStatus:DeleteCustomAvailabilityZoneResponse' :: Int
httpStatus = Int
a} :: DeleteCustomAvailabilityZoneResponse)
instance
Prelude.NFData
DeleteCustomAvailabilityZoneResponse