{-# 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.DescribeAlarmsForMetric
(
DescribeAlarmsForMetric (..),
newDescribeAlarmsForMetric,
describeAlarmsForMetric_dimensions,
describeAlarmsForMetric_extendedStatistic,
describeAlarmsForMetric_period,
describeAlarmsForMetric_statistic,
describeAlarmsForMetric_unit,
describeAlarmsForMetric_metricName,
describeAlarmsForMetric_namespace,
DescribeAlarmsForMetricResponse (..),
newDescribeAlarmsForMetricResponse,
describeAlarmsForMetricResponse_metricAlarms,
describeAlarmsForMetricResponse_httpStatus,
)
where
import Amazonka.CloudWatch.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 DescribeAlarmsForMetric = DescribeAlarmsForMetric'
{
DescribeAlarmsForMetric -> Maybe [Dimension]
dimensions :: Prelude.Maybe [Dimension],
DescribeAlarmsForMetric -> Maybe Text
extendedStatistic :: Prelude.Maybe Prelude.Text,
DescribeAlarmsForMetric -> Maybe Natural
period :: Prelude.Maybe Prelude.Natural,
DescribeAlarmsForMetric -> Maybe Statistic
statistic :: Prelude.Maybe Statistic,
DescribeAlarmsForMetric -> Maybe StandardUnit
unit :: Prelude.Maybe StandardUnit,
DescribeAlarmsForMetric -> Text
metricName :: Prelude.Text,
DescribeAlarmsForMetric -> Text
namespace :: Prelude.Text
}
deriving (DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool
$c/= :: DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool
== :: DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool
$c== :: DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool
Prelude.Eq, ReadPrec [DescribeAlarmsForMetric]
ReadPrec DescribeAlarmsForMetric
Int -> ReadS DescribeAlarmsForMetric
ReadS [DescribeAlarmsForMetric]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAlarmsForMetric]
$creadListPrec :: ReadPrec [DescribeAlarmsForMetric]
readPrec :: ReadPrec DescribeAlarmsForMetric
$creadPrec :: ReadPrec DescribeAlarmsForMetric
readList :: ReadS [DescribeAlarmsForMetric]
$creadList :: ReadS [DescribeAlarmsForMetric]
readsPrec :: Int -> ReadS DescribeAlarmsForMetric
$creadsPrec :: Int -> ReadS DescribeAlarmsForMetric
Prelude.Read, Int -> DescribeAlarmsForMetric -> ShowS
[DescribeAlarmsForMetric] -> ShowS
DescribeAlarmsForMetric -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAlarmsForMetric] -> ShowS
$cshowList :: [DescribeAlarmsForMetric] -> ShowS
show :: DescribeAlarmsForMetric -> String
$cshow :: DescribeAlarmsForMetric -> String
showsPrec :: Int -> DescribeAlarmsForMetric -> ShowS
$cshowsPrec :: Int -> DescribeAlarmsForMetric -> ShowS
Prelude.Show, forall x. Rep DescribeAlarmsForMetric x -> DescribeAlarmsForMetric
forall x. DescribeAlarmsForMetric -> Rep DescribeAlarmsForMetric x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeAlarmsForMetric x -> DescribeAlarmsForMetric
$cfrom :: forall x. DescribeAlarmsForMetric -> Rep DescribeAlarmsForMetric x
Prelude.Generic)
newDescribeAlarmsForMetric ::
Prelude.Text ->
Prelude.Text ->
DescribeAlarmsForMetric
newDescribeAlarmsForMetric :: Text -> Text -> DescribeAlarmsForMetric
newDescribeAlarmsForMetric Text
pMetricName_ Text
pNamespace_ =
DescribeAlarmsForMetric'
{ $sel:dimensions:DescribeAlarmsForMetric' :: Maybe [Dimension]
dimensions =
forall a. Maybe a
Prelude.Nothing,
$sel:extendedStatistic:DescribeAlarmsForMetric' :: Maybe Text
extendedStatistic = forall a. Maybe a
Prelude.Nothing,
$sel:period:DescribeAlarmsForMetric' :: Maybe Natural
period = forall a. Maybe a
Prelude.Nothing,
$sel:statistic:DescribeAlarmsForMetric' :: Maybe Statistic
statistic = forall a. Maybe a
Prelude.Nothing,
$sel:unit:DescribeAlarmsForMetric' :: Maybe StandardUnit
unit = forall a. Maybe a
Prelude.Nothing,
$sel:metricName:DescribeAlarmsForMetric' :: Text
metricName = Text
pMetricName_,
$sel:namespace:DescribeAlarmsForMetric' :: Text
namespace = Text
pNamespace_
}
describeAlarmsForMetric_dimensions :: Lens.Lens' DescribeAlarmsForMetric (Prelude.Maybe [Dimension])
describeAlarmsForMetric_dimensions :: Lens' DescribeAlarmsForMetric (Maybe [Dimension])
describeAlarmsForMetric_dimensions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Maybe [Dimension]
dimensions :: Maybe [Dimension]
$sel:dimensions:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe [Dimension]
dimensions} -> Maybe [Dimension]
dimensions) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Maybe [Dimension]
a -> DescribeAlarmsForMetric
s {$sel:dimensions:DescribeAlarmsForMetric' :: Maybe [Dimension]
dimensions = Maybe [Dimension]
a} :: DescribeAlarmsForMetric) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeAlarmsForMetric_extendedStatistic :: Lens.Lens' DescribeAlarmsForMetric (Prelude.Maybe Prelude.Text)
describeAlarmsForMetric_extendedStatistic :: Lens' DescribeAlarmsForMetric (Maybe Text)
describeAlarmsForMetric_extendedStatistic = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Maybe Text
extendedStatistic :: Maybe Text
$sel:extendedStatistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Text
extendedStatistic} -> Maybe Text
extendedStatistic) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Maybe Text
a -> DescribeAlarmsForMetric
s {$sel:extendedStatistic:DescribeAlarmsForMetric' :: Maybe Text
extendedStatistic = Maybe Text
a} :: DescribeAlarmsForMetric)
describeAlarmsForMetric_period :: Lens.Lens' DescribeAlarmsForMetric (Prelude.Maybe Prelude.Natural)
describeAlarmsForMetric_period :: Lens' DescribeAlarmsForMetric (Maybe Natural)
describeAlarmsForMetric_period = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Maybe Natural
period :: Maybe Natural
$sel:period:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Natural
period} -> Maybe Natural
period) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Maybe Natural
a -> DescribeAlarmsForMetric
s {$sel:period:DescribeAlarmsForMetric' :: Maybe Natural
period = Maybe Natural
a} :: DescribeAlarmsForMetric)
describeAlarmsForMetric_statistic :: Lens.Lens' DescribeAlarmsForMetric (Prelude.Maybe Statistic)
describeAlarmsForMetric_statistic :: Lens' DescribeAlarmsForMetric (Maybe Statistic)
describeAlarmsForMetric_statistic = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Maybe Statistic
statistic :: Maybe Statistic
$sel:statistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Statistic
statistic} -> Maybe Statistic
statistic) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Maybe Statistic
a -> DescribeAlarmsForMetric
s {$sel:statistic:DescribeAlarmsForMetric' :: Maybe Statistic
statistic = Maybe Statistic
a} :: DescribeAlarmsForMetric)
describeAlarmsForMetric_unit :: Lens.Lens' DescribeAlarmsForMetric (Prelude.Maybe StandardUnit)
describeAlarmsForMetric_unit :: Lens' DescribeAlarmsForMetric (Maybe StandardUnit)
describeAlarmsForMetric_unit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Maybe StandardUnit
unit :: Maybe StandardUnit
$sel:unit:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe StandardUnit
unit} -> Maybe StandardUnit
unit) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Maybe StandardUnit
a -> DescribeAlarmsForMetric
s {$sel:unit:DescribeAlarmsForMetric' :: Maybe StandardUnit
unit = Maybe StandardUnit
a} :: DescribeAlarmsForMetric)
describeAlarmsForMetric_metricName :: Lens.Lens' DescribeAlarmsForMetric Prelude.Text
describeAlarmsForMetric_metricName :: Lens' DescribeAlarmsForMetric Text
describeAlarmsForMetric_metricName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Text
metricName :: Text
$sel:metricName:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
metricName} -> Text
metricName) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Text
a -> DescribeAlarmsForMetric
s {$sel:metricName:DescribeAlarmsForMetric' :: Text
metricName = Text
a} :: DescribeAlarmsForMetric)
describeAlarmsForMetric_namespace :: Lens.Lens' DescribeAlarmsForMetric Prelude.Text
describeAlarmsForMetric_namespace :: Lens' DescribeAlarmsForMetric Text
describeAlarmsForMetric_namespace = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Text
namespace :: Text
$sel:namespace:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
namespace} -> Text
namespace) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Text
a -> DescribeAlarmsForMetric
s {$sel:namespace:DescribeAlarmsForMetric' :: Text
namespace = Text
a} :: DescribeAlarmsForMetric)
instance Core.AWSRequest DescribeAlarmsForMetric where
type
AWSResponse DescribeAlarmsForMetric =
DescribeAlarmsForMetricResponse
request :: (Service -> Service)
-> DescribeAlarmsForMetric -> Request DescribeAlarmsForMetric
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeAlarmsForMetric
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAlarmsForMetric)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DescribeAlarmsForMetricResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [MetricAlarm] -> Int -> DescribeAlarmsForMetricResponse
DescribeAlarmsForMetricResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"MetricAlarms"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
)
forall (f :: * -> *) a b. Applicative f => 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 DescribeAlarmsForMetric where
hashWithSalt :: Int -> DescribeAlarmsForMetric -> Int
hashWithSalt Int
_salt DescribeAlarmsForMetric' {Maybe Natural
Maybe [Dimension]
Maybe Text
Maybe StandardUnit
Maybe Statistic
Text
namespace :: Text
metricName :: Text
unit :: Maybe StandardUnit
statistic :: Maybe Statistic
period :: Maybe Natural
extendedStatistic :: Maybe Text
dimensions :: Maybe [Dimension]
$sel:namespace:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
$sel:metricName:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
$sel:unit:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe StandardUnit
$sel:statistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Statistic
$sel:period:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Natural
$sel:extendedStatistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Text
$sel:dimensions:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe [Dimension]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Dimension]
dimensions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
extendedStatistic
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
period
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Statistic
statistic
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StandardUnit
unit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
metricName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
namespace
instance Prelude.NFData DescribeAlarmsForMetric where
rnf :: DescribeAlarmsForMetric -> ()
rnf DescribeAlarmsForMetric' {Maybe Natural
Maybe [Dimension]
Maybe Text
Maybe StandardUnit
Maybe Statistic
Text
namespace :: Text
metricName :: Text
unit :: Maybe StandardUnit
statistic :: Maybe Statistic
period :: Maybe Natural
extendedStatistic :: Maybe Text
dimensions :: Maybe [Dimension]
$sel:namespace:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
$sel:metricName:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
$sel:unit:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe StandardUnit
$sel:statistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Statistic
$sel:period:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Natural
$sel:extendedStatistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Text
$sel:dimensions:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe [Dimension]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Dimension]
dimensions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
extendedStatistic
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
period
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Statistic
statistic
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StandardUnit
unit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
metricName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
namespace
instance Data.ToHeaders DescribeAlarmsForMetric where
toHeaders :: DescribeAlarmsForMetric -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DescribeAlarmsForMetric where
toPath :: DescribeAlarmsForMetric -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DescribeAlarmsForMetric where
toQuery :: DescribeAlarmsForMetric -> QueryString
toQuery DescribeAlarmsForMetric' {Maybe Natural
Maybe [Dimension]
Maybe Text
Maybe StandardUnit
Maybe Statistic
Text
namespace :: Text
metricName :: Text
unit :: Maybe StandardUnit
statistic :: Maybe Statistic
period :: Maybe Natural
extendedStatistic :: Maybe Text
dimensions :: Maybe [Dimension]
$sel:namespace:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
$sel:metricName:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
$sel:unit:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe StandardUnit
$sel:statistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Statistic
$sel:period:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Natural
$sel:extendedStatistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Text
$sel:dimensions:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe [Dimension]
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeAlarmsForMetric" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-08-01" :: Prelude.ByteString),
ByteString
"Dimensions"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
(forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Dimension]
dimensions),
ByteString
"ExtendedStatistic" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
extendedStatistic,
ByteString
"Period" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
period,
ByteString
"Statistic" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Statistic
statistic,
ByteString
"Unit" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe StandardUnit
unit,
ByteString
"MetricName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
metricName,
ByteString
"Namespace" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
namespace
]
data DescribeAlarmsForMetricResponse = DescribeAlarmsForMetricResponse'
{
DescribeAlarmsForMetricResponse -> Maybe [MetricAlarm]
metricAlarms :: Prelude.Maybe [MetricAlarm],
DescribeAlarmsForMetricResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool
$c/= :: DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool
== :: DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool
$c== :: DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAlarmsForMetricResponse]
ReadPrec DescribeAlarmsForMetricResponse
Int -> ReadS DescribeAlarmsForMetricResponse
ReadS [DescribeAlarmsForMetricResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAlarmsForMetricResponse]
$creadListPrec :: ReadPrec [DescribeAlarmsForMetricResponse]
readPrec :: ReadPrec DescribeAlarmsForMetricResponse
$creadPrec :: ReadPrec DescribeAlarmsForMetricResponse
readList :: ReadS [DescribeAlarmsForMetricResponse]
$creadList :: ReadS [DescribeAlarmsForMetricResponse]
readsPrec :: Int -> ReadS DescribeAlarmsForMetricResponse
$creadsPrec :: Int -> ReadS DescribeAlarmsForMetricResponse
Prelude.Read, Int -> DescribeAlarmsForMetricResponse -> ShowS
[DescribeAlarmsForMetricResponse] -> ShowS
DescribeAlarmsForMetricResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAlarmsForMetricResponse] -> ShowS
$cshowList :: [DescribeAlarmsForMetricResponse] -> ShowS
show :: DescribeAlarmsForMetricResponse -> String
$cshow :: DescribeAlarmsForMetricResponse -> String
showsPrec :: Int -> DescribeAlarmsForMetricResponse -> ShowS
$cshowsPrec :: Int -> DescribeAlarmsForMetricResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeAlarmsForMetricResponse x
-> DescribeAlarmsForMetricResponse
forall x.
DescribeAlarmsForMetricResponse
-> Rep DescribeAlarmsForMetricResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAlarmsForMetricResponse x
-> DescribeAlarmsForMetricResponse
$cfrom :: forall x.
DescribeAlarmsForMetricResponse
-> Rep DescribeAlarmsForMetricResponse x
Prelude.Generic)
newDescribeAlarmsForMetricResponse ::
Prelude.Int ->
DescribeAlarmsForMetricResponse
newDescribeAlarmsForMetricResponse :: Int -> DescribeAlarmsForMetricResponse
newDescribeAlarmsForMetricResponse Int
pHttpStatus_ =
DescribeAlarmsForMetricResponse'
{ $sel:metricAlarms:DescribeAlarmsForMetricResponse' :: Maybe [MetricAlarm]
metricAlarms =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAlarmsForMetricResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAlarmsForMetricResponse_metricAlarms :: Lens.Lens' DescribeAlarmsForMetricResponse (Prelude.Maybe [MetricAlarm])
describeAlarmsForMetricResponse_metricAlarms :: Lens' DescribeAlarmsForMetricResponse (Maybe [MetricAlarm])
describeAlarmsForMetricResponse_metricAlarms = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetricResponse' {Maybe [MetricAlarm]
metricAlarms :: Maybe [MetricAlarm]
$sel:metricAlarms:DescribeAlarmsForMetricResponse' :: DescribeAlarmsForMetricResponse -> Maybe [MetricAlarm]
metricAlarms} -> Maybe [MetricAlarm]
metricAlarms) (\s :: DescribeAlarmsForMetricResponse
s@DescribeAlarmsForMetricResponse' {} Maybe [MetricAlarm]
a -> DescribeAlarmsForMetricResponse
s {$sel:metricAlarms:DescribeAlarmsForMetricResponse' :: Maybe [MetricAlarm]
metricAlarms = Maybe [MetricAlarm]
a} :: DescribeAlarmsForMetricResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeAlarmsForMetricResponse_httpStatus :: Lens.Lens' DescribeAlarmsForMetricResponse Prelude.Int
describeAlarmsForMetricResponse_httpStatus :: Lens' DescribeAlarmsForMetricResponse Int
describeAlarmsForMetricResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetricResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAlarmsForMetricResponse' :: DescribeAlarmsForMetricResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAlarmsForMetricResponse
s@DescribeAlarmsForMetricResponse' {} Int
a -> DescribeAlarmsForMetricResponse
s {$sel:httpStatus:DescribeAlarmsForMetricResponse' :: Int
httpStatus = Int
a} :: DescribeAlarmsForMetricResponse)
instance
Prelude.NFData
DescribeAlarmsForMetricResponse
where
rnf :: DescribeAlarmsForMetricResponse -> ()
rnf DescribeAlarmsForMetricResponse' {Int
Maybe [MetricAlarm]
httpStatus :: Int
metricAlarms :: Maybe [MetricAlarm]
$sel:httpStatus:DescribeAlarmsForMetricResponse' :: DescribeAlarmsForMetricResponse -> Int
$sel:metricAlarms:DescribeAlarmsForMetricResponse' :: DescribeAlarmsForMetricResponse -> Maybe [MetricAlarm]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [MetricAlarm]
metricAlarms
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus