{-# 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.CloudWatch.DeleteAlarms
(
DeleteAlarms (..),
newDeleteAlarms,
deleteAlarms_alarmNames,
DeleteAlarmsResponse (..),
newDeleteAlarmsResponse,
)
where
import Amazonka.CloudWatch.Types
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
data DeleteAlarms = DeleteAlarms'
{
DeleteAlarms -> [Text]
alarmNames :: [Prelude.Text]
}
deriving (DeleteAlarms -> DeleteAlarms -> Bool
(DeleteAlarms -> DeleteAlarms -> Bool)
-> (DeleteAlarms -> DeleteAlarms -> Bool) -> Eq DeleteAlarms
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAlarms -> DeleteAlarms -> Bool
$c/= :: DeleteAlarms -> DeleteAlarms -> Bool
== :: DeleteAlarms -> DeleteAlarms -> Bool
$c== :: DeleteAlarms -> DeleteAlarms -> Bool
Prelude.Eq, ReadPrec [DeleteAlarms]
ReadPrec DeleteAlarms
Int -> ReadS DeleteAlarms
ReadS [DeleteAlarms]
(Int -> ReadS DeleteAlarms)
-> ReadS [DeleteAlarms]
-> ReadPrec DeleteAlarms
-> ReadPrec [DeleteAlarms]
-> Read DeleteAlarms
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAlarms]
$creadListPrec :: ReadPrec [DeleteAlarms]
readPrec :: ReadPrec DeleteAlarms
$creadPrec :: ReadPrec DeleteAlarms
readList :: ReadS [DeleteAlarms]
$creadList :: ReadS [DeleteAlarms]
readsPrec :: Int -> ReadS DeleteAlarms
$creadsPrec :: Int -> ReadS DeleteAlarms
Prelude.Read, Int -> DeleteAlarms -> ShowS
[DeleteAlarms] -> ShowS
DeleteAlarms -> String
(Int -> DeleteAlarms -> ShowS)
-> (DeleteAlarms -> String)
-> ([DeleteAlarms] -> ShowS)
-> Show DeleteAlarms
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAlarms] -> ShowS
$cshowList :: [DeleteAlarms] -> ShowS
show :: DeleteAlarms -> String
$cshow :: DeleteAlarms -> String
showsPrec :: Int -> DeleteAlarms -> ShowS
$cshowsPrec :: Int -> DeleteAlarms -> ShowS
Prelude.Show, (forall x. DeleteAlarms -> Rep DeleteAlarms x)
-> (forall x. Rep DeleteAlarms x -> DeleteAlarms)
-> Generic DeleteAlarms
forall x. Rep DeleteAlarms x -> DeleteAlarms
forall x. DeleteAlarms -> Rep DeleteAlarms x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAlarms x -> DeleteAlarms
$cfrom :: forall x. DeleteAlarms -> Rep DeleteAlarms x
Prelude.Generic)
newDeleteAlarms ::
DeleteAlarms
newDeleteAlarms :: DeleteAlarms
newDeleteAlarms =
DeleteAlarms' :: [Text] -> DeleteAlarms
DeleteAlarms' {$sel:alarmNames:DeleteAlarms' :: [Text]
alarmNames = [Text]
forall a. Monoid a => a
Prelude.mempty}
deleteAlarms_alarmNames :: Lens.Lens' DeleteAlarms [Prelude.Text]
deleteAlarms_alarmNames :: ([Text] -> f [Text]) -> DeleteAlarms -> f DeleteAlarms
deleteAlarms_alarmNames = (DeleteAlarms -> [Text])
-> (DeleteAlarms -> [Text] -> DeleteAlarms)
-> Lens DeleteAlarms DeleteAlarms [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAlarms' {[Text]
alarmNames :: [Text]
$sel:alarmNames:DeleteAlarms' :: DeleteAlarms -> [Text]
alarmNames} -> [Text]
alarmNames) (\s :: DeleteAlarms
s@DeleteAlarms' {} [Text]
a -> DeleteAlarms
s {$sel:alarmNames:DeleteAlarms' :: [Text]
alarmNames = [Text]
a} :: DeleteAlarms) (([Text] -> f [Text]) -> DeleteAlarms -> f DeleteAlarms)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> DeleteAlarms
-> f DeleteAlarms
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest DeleteAlarms where
type AWSResponse DeleteAlarms = DeleteAlarmsResponse
request :: DeleteAlarms -> Request DeleteAlarms
request = Service -> DeleteAlarms -> Request DeleteAlarms
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteAlarms
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteAlarms)))
response = AWSResponse DeleteAlarms
-> Logger
-> Service
-> Proxy DeleteAlarms
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteAlarms)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteAlarms
DeleteAlarmsResponse
DeleteAlarmsResponse'
instance Prelude.Hashable DeleteAlarms
instance Prelude.NFData DeleteAlarms
instance Core.ToHeaders DeleteAlarms where
toHeaders :: DeleteAlarms -> [Header]
toHeaders = [Header] -> DeleteAlarms -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteAlarms where
toPath :: DeleteAlarms -> ByteString
toPath = ByteString -> DeleteAlarms -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteAlarms where
toQuery :: DeleteAlarms -> QueryString
toQuery DeleteAlarms' {[Text]
alarmNames :: [Text]
$sel:alarmNames:DeleteAlarms' :: DeleteAlarms -> [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
"DeleteAlarms" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-08-01" :: Prelude.ByteString),
ByteString
"AlarmNames"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" [Text]
alarmNames
]
data DeleteAlarmsResponse = DeleteAlarmsResponse'
{
}
deriving (DeleteAlarmsResponse -> DeleteAlarmsResponse -> Bool
(DeleteAlarmsResponse -> DeleteAlarmsResponse -> Bool)
-> (DeleteAlarmsResponse -> DeleteAlarmsResponse -> Bool)
-> Eq DeleteAlarmsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAlarmsResponse -> DeleteAlarmsResponse -> Bool
$c/= :: DeleteAlarmsResponse -> DeleteAlarmsResponse -> Bool
== :: DeleteAlarmsResponse -> DeleteAlarmsResponse -> Bool
$c== :: DeleteAlarmsResponse -> DeleteAlarmsResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAlarmsResponse]
ReadPrec DeleteAlarmsResponse
Int -> ReadS DeleteAlarmsResponse
ReadS [DeleteAlarmsResponse]
(Int -> ReadS DeleteAlarmsResponse)
-> ReadS [DeleteAlarmsResponse]
-> ReadPrec DeleteAlarmsResponse
-> ReadPrec [DeleteAlarmsResponse]
-> Read DeleteAlarmsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAlarmsResponse]
$creadListPrec :: ReadPrec [DeleteAlarmsResponse]
readPrec :: ReadPrec DeleteAlarmsResponse
$creadPrec :: ReadPrec DeleteAlarmsResponse
readList :: ReadS [DeleteAlarmsResponse]
$creadList :: ReadS [DeleteAlarmsResponse]
readsPrec :: Int -> ReadS DeleteAlarmsResponse
$creadsPrec :: Int -> ReadS DeleteAlarmsResponse
Prelude.Read, Int -> DeleteAlarmsResponse -> ShowS
[DeleteAlarmsResponse] -> ShowS
DeleteAlarmsResponse -> String
(Int -> DeleteAlarmsResponse -> ShowS)
-> (DeleteAlarmsResponse -> String)
-> ([DeleteAlarmsResponse] -> ShowS)
-> Show DeleteAlarmsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAlarmsResponse] -> ShowS
$cshowList :: [DeleteAlarmsResponse] -> ShowS
show :: DeleteAlarmsResponse -> String
$cshow :: DeleteAlarmsResponse -> String
showsPrec :: Int -> DeleteAlarmsResponse -> ShowS
$cshowsPrec :: Int -> DeleteAlarmsResponse -> ShowS
Prelude.Show, (forall x. DeleteAlarmsResponse -> Rep DeleteAlarmsResponse x)
-> (forall x. Rep DeleteAlarmsResponse x -> DeleteAlarmsResponse)
-> Generic DeleteAlarmsResponse
forall x. Rep DeleteAlarmsResponse x -> DeleteAlarmsResponse
forall x. DeleteAlarmsResponse -> Rep DeleteAlarmsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAlarmsResponse x -> DeleteAlarmsResponse
$cfrom :: forall x. DeleteAlarmsResponse -> Rep DeleteAlarmsResponse x
Prelude.Generic)
newDeleteAlarmsResponse ::
DeleteAlarmsResponse
newDeleteAlarmsResponse :: DeleteAlarmsResponse
newDeleteAlarmsResponse = DeleteAlarmsResponse
DeleteAlarmsResponse'
instance Prelude.NFData DeleteAlarmsResponse