{-# 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.DeleteIncidentRecord
(
DeleteIncidentRecord (..),
newDeleteIncidentRecord,
deleteIncidentRecord_arn,
DeleteIncidentRecordResponse (..),
newDeleteIncidentRecordResponse,
deleteIncidentRecordResponse_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 DeleteIncidentRecord = DeleteIncidentRecord'
{
DeleteIncidentRecord -> Text
arn :: Prelude.Text
}
deriving (DeleteIncidentRecord -> DeleteIncidentRecord -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteIncidentRecord -> DeleteIncidentRecord -> Bool
$c/= :: DeleteIncidentRecord -> DeleteIncidentRecord -> Bool
== :: DeleteIncidentRecord -> DeleteIncidentRecord -> Bool
$c== :: DeleteIncidentRecord -> DeleteIncidentRecord -> Bool
Prelude.Eq, ReadPrec [DeleteIncidentRecord]
ReadPrec DeleteIncidentRecord
Int -> ReadS DeleteIncidentRecord
ReadS [DeleteIncidentRecord]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteIncidentRecord]
$creadListPrec :: ReadPrec [DeleteIncidentRecord]
readPrec :: ReadPrec DeleteIncidentRecord
$creadPrec :: ReadPrec DeleteIncidentRecord
readList :: ReadS [DeleteIncidentRecord]
$creadList :: ReadS [DeleteIncidentRecord]
readsPrec :: Int -> ReadS DeleteIncidentRecord
$creadsPrec :: Int -> ReadS DeleteIncidentRecord
Prelude.Read, Int -> DeleteIncidentRecord -> ShowS
[DeleteIncidentRecord] -> ShowS
DeleteIncidentRecord -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteIncidentRecord] -> ShowS
$cshowList :: [DeleteIncidentRecord] -> ShowS
show :: DeleteIncidentRecord -> String
$cshow :: DeleteIncidentRecord -> String
showsPrec :: Int -> DeleteIncidentRecord -> ShowS
$cshowsPrec :: Int -> DeleteIncidentRecord -> ShowS
Prelude.Show, forall x. Rep DeleteIncidentRecord x -> DeleteIncidentRecord
forall x. DeleteIncidentRecord -> Rep DeleteIncidentRecord x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteIncidentRecord x -> DeleteIncidentRecord
$cfrom :: forall x. DeleteIncidentRecord -> Rep DeleteIncidentRecord x
Prelude.Generic)
newDeleteIncidentRecord ::
Prelude.Text ->
DeleteIncidentRecord
newDeleteIncidentRecord :: Text -> DeleteIncidentRecord
newDeleteIncidentRecord Text
pArn_ =
DeleteIncidentRecord' {$sel:arn:DeleteIncidentRecord' :: Text
arn = Text
pArn_}
deleteIncidentRecord_arn :: Lens.Lens' DeleteIncidentRecord Prelude.Text
deleteIncidentRecord_arn :: Lens' DeleteIncidentRecord Text
deleteIncidentRecord_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteIncidentRecord' {Text
arn :: Text
$sel:arn:DeleteIncidentRecord' :: DeleteIncidentRecord -> Text
arn} -> Text
arn) (\s :: DeleteIncidentRecord
s@DeleteIncidentRecord' {} Text
a -> DeleteIncidentRecord
s {$sel:arn:DeleteIncidentRecord' :: Text
arn = Text
a} :: DeleteIncidentRecord)
instance Core.AWSRequest DeleteIncidentRecord where
type
AWSResponse DeleteIncidentRecord =
DeleteIncidentRecordResponse
request :: (Service -> Service)
-> DeleteIncidentRecord -> Request DeleteIncidentRecord
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 DeleteIncidentRecord
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteIncidentRecord)))
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 -> DeleteIncidentRecordResponse
DeleteIncidentRecordResponse'
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 DeleteIncidentRecord where
hashWithSalt :: Int -> DeleteIncidentRecord -> Int
hashWithSalt Int
_salt DeleteIncidentRecord' {Text
arn :: Text
$sel:arn:DeleteIncidentRecord' :: DeleteIncidentRecord -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
instance Prelude.NFData DeleteIncidentRecord where
rnf :: DeleteIncidentRecord -> ()
rnf DeleteIncidentRecord' {Text
arn :: Text
$sel:arn:DeleteIncidentRecord' :: DeleteIncidentRecord -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
arn
instance Data.ToHeaders DeleteIncidentRecord where
toHeaders :: DeleteIncidentRecord -> 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 DeleteIncidentRecord where
toJSON :: DeleteIncidentRecord -> Value
toJSON DeleteIncidentRecord' {Text
arn :: Text
$sel:arn:DeleteIncidentRecord' :: DeleteIncidentRecord -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"arn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
arn)]
)
instance Data.ToPath DeleteIncidentRecord where
toPath :: DeleteIncidentRecord -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/deleteIncidentRecord"
instance Data.ToQuery DeleteIncidentRecord where
toQuery :: DeleteIncidentRecord -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteIncidentRecordResponse = DeleteIncidentRecordResponse'
{
DeleteIncidentRecordResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteIncidentRecordResponse
-> DeleteIncidentRecordResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteIncidentRecordResponse
-> DeleteIncidentRecordResponse -> Bool
$c/= :: DeleteIncidentRecordResponse
-> DeleteIncidentRecordResponse -> Bool
== :: DeleteIncidentRecordResponse
-> DeleteIncidentRecordResponse -> Bool
$c== :: DeleteIncidentRecordResponse
-> DeleteIncidentRecordResponse -> Bool
Prelude.Eq, ReadPrec [DeleteIncidentRecordResponse]
ReadPrec DeleteIncidentRecordResponse
Int -> ReadS DeleteIncidentRecordResponse
ReadS [DeleteIncidentRecordResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteIncidentRecordResponse]
$creadListPrec :: ReadPrec [DeleteIncidentRecordResponse]
readPrec :: ReadPrec DeleteIncidentRecordResponse
$creadPrec :: ReadPrec DeleteIncidentRecordResponse
readList :: ReadS [DeleteIncidentRecordResponse]
$creadList :: ReadS [DeleteIncidentRecordResponse]
readsPrec :: Int -> ReadS DeleteIncidentRecordResponse
$creadsPrec :: Int -> ReadS DeleteIncidentRecordResponse
Prelude.Read, Int -> DeleteIncidentRecordResponse -> ShowS
[DeleteIncidentRecordResponse] -> ShowS
DeleteIncidentRecordResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteIncidentRecordResponse] -> ShowS
$cshowList :: [DeleteIncidentRecordResponse] -> ShowS
show :: DeleteIncidentRecordResponse -> String
$cshow :: DeleteIncidentRecordResponse -> String
showsPrec :: Int -> DeleteIncidentRecordResponse -> ShowS
$cshowsPrec :: Int -> DeleteIncidentRecordResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteIncidentRecordResponse x -> DeleteIncidentRecordResponse
forall x.
DeleteIncidentRecordResponse -> Rep DeleteIncidentRecordResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteIncidentRecordResponse x -> DeleteIncidentRecordResponse
$cfrom :: forall x.
DeleteIncidentRecordResponse -> Rep DeleteIncidentRecordResponse x
Prelude.Generic)
newDeleteIncidentRecordResponse ::
Prelude.Int ->
DeleteIncidentRecordResponse
newDeleteIncidentRecordResponse :: Int -> DeleteIncidentRecordResponse
newDeleteIncidentRecordResponse Int
pHttpStatus_ =
DeleteIncidentRecordResponse'
{ $sel:httpStatus:DeleteIncidentRecordResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteIncidentRecordResponse_httpStatus :: Lens.Lens' DeleteIncidentRecordResponse Prelude.Int
deleteIncidentRecordResponse_httpStatus :: Lens' DeleteIncidentRecordResponse Int
deleteIncidentRecordResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteIncidentRecordResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteIncidentRecordResponse' :: DeleteIncidentRecordResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteIncidentRecordResponse
s@DeleteIncidentRecordResponse' {} Int
a -> DeleteIncidentRecordResponse
s {$sel:httpStatus:DeleteIncidentRecordResponse' :: Int
httpStatus = Int
a} :: DeleteIncidentRecordResponse)
instance Prelude.NFData DeleteIncidentRecordResponse where
rnf :: DeleteIncidentRecordResponse -> ()
rnf DeleteIncidentRecordResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteIncidentRecordResponse' :: DeleteIncidentRecordResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus