{-# 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.AMP.DeleteAlertManagerDefinition
(
DeleteAlertManagerDefinition (..),
newDeleteAlertManagerDefinition,
deleteAlertManagerDefinition_clientToken,
deleteAlertManagerDefinition_workspaceId,
DeleteAlertManagerDefinitionResponse (..),
newDeleteAlertManagerDefinitionResponse,
)
where
import Amazonka.AMP.Types
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
data DeleteAlertManagerDefinition = DeleteAlertManagerDefinition'
{
DeleteAlertManagerDefinition -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
DeleteAlertManagerDefinition -> Text
workspaceId :: Prelude.Text
}
deriving (DeleteAlertManagerDefinition
-> DeleteAlertManagerDefinition -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAlertManagerDefinition
-> DeleteAlertManagerDefinition -> Bool
$c/= :: DeleteAlertManagerDefinition
-> DeleteAlertManagerDefinition -> Bool
== :: DeleteAlertManagerDefinition
-> DeleteAlertManagerDefinition -> Bool
$c== :: DeleteAlertManagerDefinition
-> DeleteAlertManagerDefinition -> Bool
Prelude.Eq, ReadPrec [DeleteAlertManagerDefinition]
ReadPrec DeleteAlertManagerDefinition
Int -> ReadS DeleteAlertManagerDefinition
ReadS [DeleteAlertManagerDefinition]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAlertManagerDefinition]
$creadListPrec :: ReadPrec [DeleteAlertManagerDefinition]
readPrec :: ReadPrec DeleteAlertManagerDefinition
$creadPrec :: ReadPrec DeleteAlertManagerDefinition
readList :: ReadS [DeleteAlertManagerDefinition]
$creadList :: ReadS [DeleteAlertManagerDefinition]
readsPrec :: Int -> ReadS DeleteAlertManagerDefinition
$creadsPrec :: Int -> ReadS DeleteAlertManagerDefinition
Prelude.Read, Int -> DeleteAlertManagerDefinition -> ShowS
[DeleteAlertManagerDefinition] -> ShowS
DeleteAlertManagerDefinition -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAlertManagerDefinition] -> ShowS
$cshowList :: [DeleteAlertManagerDefinition] -> ShowS
show :: DeleteAlertManagerDefinition -> String
$cshow :: DeleteAlertManagerDefinition -> String
showsPrec :: Int -> DeleteAlertManagerDefinition -> ShowS
$cshowsPrec :: Int -> DeleteAlertManagerDefinition -> ShowS
Prelude.Show, forall x.
Rep DeleteAlertManagerDefinition x -> DeleteAlertManagerDefinition
forall x.
DeleteAlertManagerDefinition -> Rep DeleteAlertManagerDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAlertManagerDefinition x -> DeleteAlertManagerDefinition
$cfrom :: forall x.
DeleteAlertManagerDefinition -> Rep DeleteAlertManagerDefinition x
Prelude.Generic)
newDeleteAlertManagerDefinition ::
Prelude.Text ->
DeleteAlertManagerDefinition
newDeleteAlertManagerDefinition :: Text -> DeleteAlertManagerDefinition
newDeleteAlertManagerDefinition Text
pWorkspaceId_ =
DeleteAlertManagerDefinition'
{ $sel:clientToken:DeleteAlertManagerDefinition' :: Maybe Text
clientToken =
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceId:DeleteAlertManagerDefinition' :: Text
workspaceId = Text
pWorkspaceId_
}
deleteAlertManagerDefinition_clientToken :: Lens.Lens' DeleteAlertManagerDefinition (Prelude.Maybe Prelude.Text)
deleteAlertManagerDefinition_clientToken :: Lens' DeleteAlertManagerDefinition (Maybe Text)
deleteAlertManagerDefinition_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAlertManagerDefinition' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:DeleteAlertManagerDefinition' :: DeleteAlertManagerDefinition -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: DeleteAlertManagerDefinition
s@DeleteAlertManagerDefinition' {} Maybe Text
a -> DeleteAlertManagerDefinition
s {$sel:clientToken:DeleteAlertManagerDefinition' :: Maybe Text
clientToken = Maybe Text
a} :: DeleteAlertManagerDefinition)
deleteAlertManagerDefinition_workspaceId :: Lens.Lens' DeleteAlertManagerDefinition Prelude.Text
deleteAlertManagerDefinition_workspaceId :: Lens' DeleteAlertManagerDefinition Text
deleteAlertManagerDefinition_workspaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAlertManagerDefinition' {Text
workspaceId :: Text
$sel:workspaceId:DeleteAlertManagerDefinition' :: DeleteAlertManagerDefinition -> Text
workspaceId} -> Text
workspaceId) (\s :: DeleteAlertManagerDefinition
s@DeleteAlertManagerDefinition' {} Text
a -> DeleteAlertManagerDefinition
s {$sel:workspaceId:DeleteAlertManagerDefinition' :: Text
workspaceId = Text
a} :: DeleteAlertManagerDefinition)
instance Core.AWSRequest DeleteAlertManagerDefinition where
type
AWSResponse DeleteAlertManagerDefinition =
DeleteAlertManagerDefinitionResponse
request :: (Service -> Service)
-> DeleteAlertManagerDefinition
-> Request DeleteAlertManagerDefinition
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteAlertManagerDefinition
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAlertManagerDefinition)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
DeleteAlertManagerDefinitionResponse
DeleteAlertManagerDefinitionResponse'
instance
Prelude.Hashable
DeleteAlertManagerDefinition
where
hashWithSalt :: Int -> DeleteAlertManagerDefinition -> Int
hashWithSalt Int
_salt DeleteAlertManagerDefinition' {Maybe Text
Text
workspaceId :: Text
clientToken :: Maybe Text
$sel:workspaceId:DeleteAlertManagerDefinition' :: DeleteAlertManagerDefinition -> Text
$sel:clientToken:DeleteAlertManagerDefinition' :: DeleteAlertManagerDefinition -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
workspaceId
instance Prelude.NFData DeleteAlertManagerDefinition where
rnf :: DeleteAlertManagerDefinition -> ()
rnf DeleteAlertManagerDefinition' {Maybe Text
Text
workspaceId :: Text
clientToken :: Maybe Text
$sel:workspaceId:DeleteAlertManagerDefinition' :: DeleteAlertManagerDefinition -> Text
$sel:clientToken:DeleteAlertManagerDefinition' :: DeleteAlertManagerDefinition -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
workspaceId
instance Data.ToHeaders DeleteAlertManagerDefinition where
toHeaders :: DeleteAlertManagerDefinition -> [Header]
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 -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DeleteAlertManagerDefinition where
toPath :: DeleteAlertManagerDefinition -> ByteString
toPath DeleteAlertManagerDefinition' {Maybe Text
Text
workspaceId :: Text
clientToken :: Maybe Text
$sel:workspaceId:DeleteAlertManagerDefinition' :: DeleteAlertManagerDefinition -> Text
$sel:clientToken:DeleteAlertManagerDefinition' :: DeleteAlertManagerDefinition -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/workspaces/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
workspaceId,
ByteString
"/alertmanager/definition"
]
instance Data.ToQuery DeleteAlertManagerDefinition where
toQuery :: DeleteAlertManagerDefinition -> QueryString
toQuery DeleteAlertManagerDefinition' {Maybe Text
Text
workspaceId :: Text
clientToken :: Maybe Text
$sel:workspaceId:DeleteAlertManagerDefinition' :: DeleteAlertManagerDefinition -> Text
$sel:clientToken:DeleteAlertManagerDefinition' :: DeleteAlertManagerDefinition -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"clientToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientToken]
data DeleteAlertManagerDefinitionResponse = DeleteAlertManagerDefinitionResponse'
{
}
deriving (DeleteAlertManagerDefinitionResponse
-> DeleteAlertManagerDefinitionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAlertManagerDefinitionResponse
-> DeleteAlertManagerDefinitionResponse -> Bool
$c/= :: DeleteAlertManagerDefinitionResponse
-> DeleteAlertManagerDefinitionResponse -> Bool
== :: DeleteAlertManagerDefinitionResponse
-> DeleteAlertManagerDefinitionResponse -> Bool
$c== :: DeleteAlertManagerDefinitionResponse
-> DeleteAlertManagerDefinitionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAlertManagerDefinitionResponse]
ReadPrec DeleteAlertManagerDefinitionResponse
Int -> ReadS DeleteAlertManagerDefinitionResponse
ReadS [DeleteAlertManagerDefinitionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAlertManagerDefinitionResponse]
$creadListPrec :: ReadPrec [DeleteAlertManagerDefinitionResponse]
readPrec :: ReadPrec DeleteAlertManagerDefinitionResponse
$creadPrec :: ReadPrec DeleteAlertManagerDefinitionResponse
readList :: ReadS [DeleteAlertManagerDefinitionResponse]
$creadList :: ReadS [DeleteAlertManagerDefinitionResponse]
readsPrec :: Int -> ReadS DeleteAlertManagerDefinitionResponse
$creadsPrec :: Int -> ReadS DeleteAlertManagerDefinitionResponse
Prelude.Read, Int -> DeleteAlertManagerDefinitionResponse -> ShowS
[DeleteAlertManagerDefinitionResponse] -> ShowS
DeleteAlertManagerDefinitionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAlertManagerDefinitionResponse] -> ShowS
$cshowList :: [DeleteAlertManagerDefinitionResponse] -> ShowS
show :: DeleteAlertManagerDefinitionResponse -> String
$cshow :: DeleteAlertManagerDefinitionResponse -> String
showsPrec :: Int -> DeleteAlertManagerDefinitionResponse -> ShowS
$cshowsPrec :: Int -> DeleteAlertManagerDefinitionResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteAlertManagerDefinitionResponse x
-> DeleteAlertManagerDefinitionResponse
forall x.
DeleteAlertManagerDefinitionResponse
-> Rep DeleteAlertManagerDefinitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAlertManagerDefinitionResponse x
-> DeleteAlertManagerDefinitionResponse
$cfrom :: forall x.
DeleteAlertManagerDefinitionResponse
-> Rep DeleteAlertManagerDefinitionResponse x
Prelude.Generic)
newDeleteAlertManagerDefinitionResponse ::
DeleteAlertManagerDefinitionResponse
newDeleteAlertManagerDefinitionResponse :: DeleteAlertManagerDefinitionResponse
newDeleteAlertManagerDefinitionResponse =
DeleteAlertManagerDefinitionResponse
DeleteAlertManagerDefinitionResponse'
instance
Prelude.NFData
DeleteAlertManagerDefinitionResponse
where
rnf :: DeleteAlertManagerDefinitionResponse -> ()
rnf DeleteAlertManagerDefinitionResponse
_ = ()