{-# 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.SSMIncidents.DeleteReplicationSet
(
DeleteReplicationSet (..),
newDeleteReplicationSet,
deleteReplicationSet_arn,
DeleteReplicationSetResponse (..),
newDeleteReplicationSetResponse,
deleteReplicationSetResponse_httpStatus,
)
where
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
import Amazonka.SSMIncidents.Types
data DeleteReplicationSet = DeleteReplicationSet'
{
DeleteReplicationSet -> Text
arn :: Prelude.Text
}
deriving (DeleteReplicationSet -> DeleteReplicationSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReplicationSet -> DeleteReplicationSet -> Bool
$c/= :: DeleteReplicationSet -> DeleteReplicationSet -> Bool
== :: DeleteReplicationSet -> DeleteReplicationSet -> Bool
$c== :: DeleteReplicationSet -> DeleteReplicationSet -> Bool
Prelude.Eq, ReadPrec [DeleteReplicationSet]
ReadPrec DeleteReplicationSet
Int -> ReadS DeleteReplicationSet
ReadS [DeleteReplicationSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReplicationSet]
$creadListPrec :: ReadPrec [DeleteReplicationSet]
readPrec :: ReadPrec DeleteReplicationSet
$creadPrec :: ReadPrec DeleteReplicationSet
readList :: ReadS [DeleteReplicationSet]
$creadList :: ReadS [DeleteReplicationSet]
readsPrec :: Int -> ReadS DeleteReplicationSet
$creadsPrec :: Int -> ReadS DeleteReplicationSet
Prelude.Read, Int -> DeleteReplicationSet -> ShowS
[DeleteReplicationSet] -> ShowS
DeleteReplicationSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReplicationSet] -> ShowS
$cshowList :: [DeleteReplicationSet] -> ShowS
show :: DeleteReplicationSet -> String
$cshow :: DeleteReplicationSet -> String
showsPrec :: Int -> DeleteReplicationSet -> ShowS
$cshowsPrec :: Int -> DeleteReplicationSet -> ShowS
Prelude.Show, forall x. Rep DeleteReplicationSet x -> DeleteReplicationSet
forall x. DeleteReplicationSet -> Rep DeleteReplicationSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteReplicationSet x -> DeleteReplicationSet
$cfrom :: forall x. DeleteReplicationSet -> Rep DeleteReplicationSet x
Prelude.Generic)
newDeleteReplicationSet ::
Prelude.Text ->
DeleteReplicationSet
newDeleteReplicationSet :: Text -> DeleteReplicationSet
newDeleteReplicationSet Text
pArn_ =
DeleteReplicationSet' {$sel:arn:DeleteReplicationSet' :: Text
arn = Text
pArn_}
deleteReplicationSet_arn :: Lens.Lens' DeleteReplicationSet Prelude.Text
deleteReplicationSet_arn :: Lens' DeleteReplicationSet Text
deleteReplicationSet_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReplicationSet' {Text
arn :: Text
$sel:arn:DeleteReplicationSet' :: DeleteReplicationSet -> Text
arn} -> Text
arn) (\s :: DeleteReplicationSet
s@DeleteReplicationSet' {} Text
a -> DeleteReplicationSet
s {$sel:arn:DeleteReplicationSet' :: Text
arn = Text
a} :: DeleteReplicationSet)
instance Core.AWSRequest DeleteReplicationSet where
type
AWSResponse DeleteReplicationSet =
DeleteReplicationSetResponse
request :: (Service -> Service)
-> DeleteReplicationSet -> Request DeleteReplicationSet
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 DeleteReplicationSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteReplicationSet)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteReplicationSetResponse
DeleteReplicationSetResponse'
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))
)
instance Prelude.Hashable DeleteReplicationSet where
hashWithSalt :: Int -> DeleteReplicationSet -> Int
hashWithSalt Int
_salt DeleteReplicationSet' {Text
arn :: Text
$sel:arn:DeleteReplicationSet' :: DeleteReplicationSet -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
instance Prelude.NFData DeleteReplicationSet where
rnf :: DeleteReplicationSet -> ()
rnf DeleteReplicationSet' {Text
arn :: Text
$sel:arn:DeleteReplicationSet' :: DeleteReplicationSet -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
arn
instance Data.ToHeaders DeleteReplicationSet where
toHeaders :: DeleteReplicationSet -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteReplicationSet where
toJSON :: DeleteReplicationSet -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)
instance Data.ToPath DeleteReplicationSet where
toPath :: DeleteReplicationSet -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/deleteReplicationSet"
instance Data.ToQuery DeleteReplicationSet where
toQuery :: DeleteReplicationSet -> QueryString
toQuery DeleteReplicationSet' {Text
arn :: Text
$sel:arn:DeleteReplicationSet' :: DeleteReplicationSet -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"arn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
arn]
data DeleteReplicationSetResponse = DeleteReplicationSetResponse'
{
DeleteReplicationSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteReplicationSetResponse
-> DeleteReplicationSetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReplicationSetResponse
-> DeleteReplicationSetResponse -> Bool
$c/= :: DeleteReplicationSetResponse
-> DeleteReplicationSetResponse -> Bool
== :: DeleteReplicationSetResponse
-> DeleteReplicationSetResponse -> Bool
$c== :: DeleteReplicationSetResponse
-> DeleteReplicationSetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteReplicationSetResponse]
ReadPrec DeleteReplicationSetResponse
Int -> ReadS DeleteReplicationSetResponse
ReadS [DeleteReplicationSetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReplicationSetResponse]
$creadListPrec :: ReadPrec [DeleteReplicationSetResponse]
readPrec :: ReadPrec DeleteReplicationSetResponse
$creadPrec :: ReadPrec DeleteReplicationSetResponse
readList :: ReadS [DeleteReplicationSetResponse]
$creadList :: ReadS [DeleteReplicationSetResponse]
readsPrec :: Int -> ReadS DeleteReplicationSetResponse
$creadsPrec :: Int -> ReadS DeleteReplicationSetResponse
Prelude.Read, Int -> DeleteReplicationSetResponse -> ShowS
[DeleteReplicationSetResponse] -> ShowS
DeleteReplicationSetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReplicationSetResponse] -> ShowS
$cshowList :: [DeleteReplicationSetResponse] -> ShowS
show :: DeleteReplicationSetResponse -> String
$cshow :: DeleteReplicationSetResponse -> String
showsPrec :: Int -> DeleteReplicationSetResponse -> ShowS
$cshowsPrec :: Int -> DeleteReplicationSetResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteReplicationSetResponse x -> DeleteReplicationSetResponse
forall x.
DeleteReplicationSetResponse -> Rep DeleteReplicationSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteReplicationSetResponse x -> DeleteReplicationSetResponse
$cfrom :: forall x.
DeleteReplicationSetResponse -> Rep DeleteReplicationSetResponse x
Prelude.Generic)
newDeleteReplicationSetResponse ::
Prelude.Int ->
DeleteReplicationSetResponse
newDeleteReplicationSetResponse :: Int -> DeleteReplicationSetResponse
newDeleteReplicationSetResponse Int
pHttpStatus_ =
DeleteReplicationSetResponse'
{ $sel:httpStatus:DeleteReplicationSetResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteReplicationSetResponse_httpStatus :: Lens.Lens' DeleteReplicationSetResponse Prelude.Int
deleteReplicationSetResponse_httpStatus :: Lens' DeleteReplicationSetResponse Int
deleteReplicationSetResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReplicationSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteReplicationSetResponse' :: DeleteReplicationSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteReplicationSetResponse
s@DeleteReplicationSetResponse' {} Int
a -> DeleteReplicationSetResponse
s {$sel:httpStatus:DeleteReplicationSetResponse' :: Int
httpStatus = Int
a} :: DeleteReplicationSetResponse)
instance Prelude.NFData DeleteReplicationSetResponse where
rnf :: DeleteReplicationSetResponse -> ()
rnf DeleteReplicationSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteReplicationSetResponse' :: DeleteReplicationSetResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus