{-# 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.DescribeAnomalyDetectors
(
DescribeAnomalyDetectors (..),
newDescribeAnomalyDetectors,
describeAnomalyDetectors_anomalyDetectorTypes,
describeAnomalyDetectors_dimensions,
describeAnomalyDetectors_maxResults,
describeAnomalyDetectors_metricName,
describeAnomalyDetectors_namespace,
describeAnomalyDetectors_nextToken,
DescribeAnomalyDetectorsResponse (..),
newDescribeAnomalyDetectorsResponse,
describeAnomalyDetectorsResponse_anomalyDetectors,
describeAnomalyDetectorsResponse_nextToken,
describeAnomalyDetectorsResponse_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 DescribeAnomalyDetectors = DescribeAnomalyDetectors'
{
DescribeAnomalyDetectors -> Maybe [AnomalyDetectorType]
anomalyDetectorTypes :: Prelude.Maybe [AnomalyDetectorType],
DescribeAnomalyDetectors -> Maybe [Dimension]
dimensions :: Prelude.Maybe [Dimension],
DescribeAnomalyDetectors -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DescribeAnomalyDetectors -> Maybe Text
metricName :: Prelude.Maybe Prelude.Text,
DescribeAnomalyDetectors -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
DescribeAnomalyDetectors -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
}
deriving (DescribeAnomalyDetectors -> DescribeAnomalyDetectors -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAnomalyDetectors -> DescribeAnomalyDetectors -> Bool
$c/= :: DescribeAnomalyDetectors -> DescribeAnomalyDetectors -> Bool
== :: DescribeAnomalyDetectors -> DescribeAnomalyDetectors -> Bool
$c== :: DescribeAnomalyDetectors -> DescribeAnomalyDetectors -> Bool
Prelude.Eq, ReadPrec [DescribeAnomalyDetectors]
ReadPrec DescribeAnomalyDetectors
Int -> ReadS DescribeAnomalyDetectors
ReadS [DescribeAnomalyDetectors]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAnomalyDetectors]
$creadListPrec :: ReadPrec [DescribeAnomalyDetectors]
readPrec :: ReadPrec DescribeAnomalyDetectors
$creadPrec :: ReadPrec DescribeAnomalyDetectors
readList :: ReadS [DescribeAnomalyDetectors]
$creadList :: ReadS [DescribeAnomalyDetectors]
readsPrec :: Int -> ReadS DescribeAnomalyDetectors
$creadsPrec :: Int -> ReadS DescribeAnomalyDetectors
Prelude.Read, Int -> DescribeAnomalyDetectors -> ShowS
[DescribeAnomalyDetectors] -> ShowS
DescribeAnomalyDetectors -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAnomalyDetectors] -> ShowS
$cshowList :: [DescribeAnomalyDetectors] -> ShowS
show :: DescribeAnomalyDetectors -> String
$cshow :: DescribeAnomalyDetectors -> String
showsPrec :: Int -> DescribeAnomalyDetectors -> ShowS
$cshowsPrec :: Int -> DescribeAnomalyDetectors -> ShowS
Prelude.Show, forall x.
Rep DescribeAnomalyDetectors x -> DescribeAnomalyDetectors
forall x.
DescribeAnomalyDetectors -> Rep DescribeAnomalyDetectors x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAnomalyDetectors x -> DescribeAnomalyDetectors
$cfrom :: forall x.
DescribeAnomalyDetectors -> Rep DescribeAnomalyDetectors x
Prelude.Generic)
newDescribeAnomalyDetectors ::
DescribeAnomalyDetectors
newDescribeAnomalyDetectors :: DescribeAnomalyDetectors
newDescribeAnomalyDetectors =
DescribeAnomalyDetectors'
{ $sel:anomalyDetectorTypes:DescribeAnomalyDetectors' :: Maybe [AnomalyDetectorType]
anomalyDetectorTypes =
forall a. Maybe a
Prelude.Nothing,
$sel:dimensions:DescribeAnomalyDetectors' :: Maybe [Dimension]
dimensions = forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeAnomalyDetectors' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:metricName:DescribeAnomalyDetectors' :: Maybe Text
metricName = forall a. Maybe a
Prelude.Nothing,
$sel:namespace:DescribeAnomalyDetectors' :: Maybe Text
namespace = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeAnomalyDetectors' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
}
describeAnomalyDetectors_anomalyDetectorTypes :: Lens.Lens' DescribeAnomalyDetectors (Prelude.Maybe [AnomalyDetectorType])
describeAnomalyDetectors_anomalyDetectorTypes :: Lens' DescribeAnomalyDetectors (Maybe [AnomalyDetectorType])
describeAnomalyDetectors_anomalyDetectorTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAnomalyDetectors' {Maybe [AnomalyDetectorType]
anomalyDetectorTypes :: Maybe [AnomalyDetectorType]
$sel:anomalyDetectorTypes:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe [AnomalyDetectorType]
anomalyDetectorTypes} -> Maybe [AnomalyDetectorType]
anomalyDetectorTypes) (\s :: DescribeAnomalyDetectors
s@DescribeAnomalyDetectors' {} Maybe [AnomalyDetectorType]
a -> DescribeAnomalyDetectors
s {$sel:anomalyDetectorTypes:DescribeAnomalyDetectors' :: Maybe [AnomalyDetectorType]
anomalyDetectorTypes = Maybe [AnomalyDetectorType]
a} :: DescribeAnomalyDetectors) 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
describeAnomalyDetectors_dimensions :: Lens.Lens' DescribeAnomalyDetectors (Prelude.Maybe [Dimension])
describeAnomalyDetectors_dimensions :: Lens' DescribeAnomalyDetectors (Maybe [Dimension])
describeAnomalyDetectors_dimensions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAnomalyDetectors' {Maybe [Dimension]
dimensions :: Maybe [Dimension]
$sel:dimensions:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe [Dimension]
dimensions} -> Maybe [Dimension]
dimensions) (\s :: DescribeAnomalyDetectors
s@DescribeAnomalyDetectors' {} Maybe [Dimension]
a -> DescribeAnomalyDetectors
s {$sel:dimensions:DescribeAnomalyDetectors' :: Maybe [Dimension]
dimensions = Maybe [Dimension]
a} :: DescribeAnomalyDetectors) 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
describeAnomalyDetectors_maxResults :: Lens.Lens' DescribeAnomalyDetectors (Prelude.Maybe Prelude.Natural)
describeAnomalyDetectors_maxResults :: Lens' DescribeAnomalyDetectors (Maybe Natural)
describeAnomalyDetectors_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAnomalyDetectors' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeAnomalyDetectors
s@DescribeAnomalyDetectors' {} Maybe Natural
a -> DescribeAnomalyDetectors
s {$sel:maxResults:DescribeAnomalyDetectors' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeAnomalyDetectors)
describeAnomalyDetectors_metricName :: Lens.Lens' DescribeAnomalyDetectors (Prelude.Maybe Prelude.Text)
describeAnomalyDetectors_metricName :: Lens' DescribeAnomalyDetectors (Maybe Text)
describeAnomalyDetectors_metricName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAnomalyDetectors' {Maybe Text
metricName :: Maybe Text
$sel:metricName:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
metricName} -> Maybe Text
metricName) (\s :: DescribeAnomalyDetectors
s@DescribeAnomalyDetectors' {} Maybe Text
a -> DescribeAnomalyDetectors
s {$sel:metricName:DescribeAnomalyDetectors' :: Maybe Text
metricName = Maybe Text
a} :: DescribeAnomalyDetectors)
describeAnomalyDetectors_namespace :: Lens.Lens' DescribeAnomalyDetectors (Prelude.Maybe Prelude.Text)
describeAnomalyDetectors_namespace :: Lens' DescribeAnomalyDetectors (Maybe Text)
describeAnomalyDetectors_namespace = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAnomalyDetectors' {Maybe Text
namespace :: Maybe Text
$sel:namespace:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: DescribeAnomalyDetectors
s@DescribeAnomalyDetectors' {} Maybe Text
a -> DescribeAnomalyDetectors
s {$sel:namespace:DescribeAnomalyDetectors' :: Maybe Text
namespace = Maybe Text
a} :: DescribeAnomalyDetectors)
describeAnomalyDetectors_nextToken :: Lens.Lens' DescribeAnomalyDetectors (Prelude.Maybe Prelude.Text)
describeAnomalyDetectors_nextToken :: Lens' DescribeAnomalyDetectors (Maybe Text)
describeAnomalyDetectors_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAnomalyDetectors' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAnomalyDetectors
s@DescribeAnomalyDetectors' {} Maybe Text
a -> DescribeAnomalyDetectors
s {$sel:nextToken:DescribeAnomalyDetectors' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAnomalyDetectors)
instance Core.AWSPager DescribeAnomalyDetectors where
page :: DescribeAnomalyDetectors
-> AWSResponse DescribeAnomalyDetectors
-> Maybe DescribeAnomalyDetectors
page DescribeAnomalyDetectors
rq AWSResponse DescribeAnomalyDetectors
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeAnomalyDetectors
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeAnomalyDetectorsResponse (Maybe Text)
describeAnomalyDetectorsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeAnomalyDetectors
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeAnomalyDetectorsResponse (Maybe [AnomalyDetector])
describeAnomalyDetectorsResponse_anomalyDetectors
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
forall a. a -> Maybe a
Prelude.Just
forall a b. (a -> b) -> a -> b
Prelude.$ DescribeAnomalyDetectors
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeAnomalyDetectors (Maybe Text)
describeAnomalyDetectors_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeAnomalyDetectors
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeAnomalyDetectorsResponse (Maybe Text)
describeAnomalyDetectorsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest DescribeAnomalyDetectors where
type
AWSResponse DescribeAnomalyDetectors =
DescribeAnomalyDetectorsResponse
request :: (Service -> Service)
-> DescribeAnomalyDetectors -> Request DescribeAnomalyDetectors
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 DescribeAnomalyDetectors
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAnomalyDetectors)))
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
"DescribeAnomalyDetectorsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [AnomalyDetector]
-> Maybe Text -> Int -> DescribeAnomalyDetectorsResponse
DescribeAnomalyDetectorsResponse'
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
"AnomalyDetectors"
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.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NextToken")
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 DescribeAnomalyDetectors where
hashWithSalt :: Int -> DescribeAnomalyDetectors -> Int
hashWithSalt Int
_salt DescribeAnomalyDetectors' {Maybe Natural
Maybe [AnomalyDetectorType]
Maybe [Dimension]
Maybe Text
nextToken :: Maybe Text
namespace :: Maybe Text
metricName :: Maybe Text
maxResults :: Maybe Natural
dimensions :: Maybe [Dimension]
anomalyDetectorTypes :: Maybe [AnomalyDetectorType]
$sel:nextToken:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
$sel:namespace:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
$sel:metricName:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
$sel:maxResults:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Natural
$sel:dimensions:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe [Dimension]
$sel:anomalyDetectorTypes:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe [AnomalyDetectorType]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [AnomalyDetectorType]
anomalyDetectorTypes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Dimension]
dimensions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
metricName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
namespace
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
instance Prelude.NFData DescribeAnomalyDetectors where
rnf :: DescribeAnomalyDetectors -> ()
rnf DescribeAnomalyDetectors' {Maybe Natural
Maybe [AnomalyDetectorType]
Maybe [Dimension]
Maybe Text
nextToken :: Maybe Text
namespace :: Maybe Text
metricName :: Maybe Text
maxResults :: Maybe Natural
dimensions :: Maybe [Dimension]
anomalyDetectorTypes :: Maybe [AnomalyDetectorType]
$sel:nextToken:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
$sel:namespace:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
$sel:metricName:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
$sel:maxResults:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Natural
$sel:dimensions:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe [Dimension]
$sel:anomalyDetectorTypes:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe [AnomalyDetectorType]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [AnomalyDetectorType]
anomalyDetectorTypes
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
metricName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
namespace
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
instance Data.ToHeaders DescribeAnomalyDetectors where
toHeaders :: DescribeAnomalyDetectors -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DescribeAnomalyDetectors where
toPath :: DescribeAnomalyDetectors -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DescribeAnomalyDetectors where
toQuery :: DescribeAnomalyDetectors -> QueryString
toQuery DescribeAnomalyDetectors' {Maybe Natural
Maybe [AnomalyDetectorType]
Maybe [Dimension]
Maybe Text
nextToken :: Maybe Text
namespace :: Maybe Text
metricName :: Maybe Text
maxResults :: Maybe Natural
dimensions :: Maybe [Dimension]
anomalyDetectorTypes :: Maybe [AnomalyDetectorType]
$sel:nextToken:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
$sel:namespace:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
$sel:metricName:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Text
$sel:maxResults:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe Natural
$sel:dimensions:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe [Dimension]
$sel:anomalyDetectorTypes:DescribeAnomalyDetectors' :: DescribeAnomalyDetectors -> Maybe [AnomalyDetectorType]
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeAnomalyDetectors" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-08-01" :: Prelude.ByteString),
ByteString
"AnomalyDetectorTypes"
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 [AnomalyDetectorType]
anomalyDetectorTypes
),
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
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
ByteString
"MetricName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
metricName,
ByteString
"Namespace" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
namespace,
ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
]
data DescribeAnomalyDetectorsResponse = DescribeAnomalyDetectorsResponse'
{
DescribeAnomalyDetectorsResponse -> Maybe [AnomalyDetector]
anomalyDetectors :: Prelude.Maybe [AnomalyDetector],
DescribeAnomalyDetectorsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeAnomalyDetectorsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeAnomalyDetectorsResponse
-> DescribeAnomalyDetectorsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAnomalyDetectorsResponse
-> DescribeAnomalyDetectorsResponse -> Bool
$c/= :: DescribeAnomalyDetectorsResponse
-> DescribeAnomalyDetectorsResponse -> Bool
== :: DescribeAnomalyDetectorsResponse
-> DescribeAnomalyDetectorsResponse -> Bool
$c== :: DescribeAnomalyDetectorsResponse
-> DescribeAnomalyDetectorsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAnomalyDetectorsResponse]
ReadPrec DescribeAnomalyDetectorsResponse
Int -> ReadS DescribeAnomalyDetectorsResponse
ReadS [DescribeAnomalyDetectorsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAnomalyDetectorsResponse]
$creadListPrec :: ReadPrec [DescribeAnomalyDetectorsResponse]
readPrec :: ReadPrec DescribeAnomalyDetectorsResponse
$creadPrec :: ReadPrec DescribeAnomalyDetectorsResponse
readList :: ReadS [DescribeAnomalyDetectorsResponse]
$creadList :: ReadS [DescribeAnomalyDetectorsResponse]
readsPrec :: Int -> ReadS DescribeAnomalyDetectorsResponse
$creadsPrec :: Int -> ReadS DescribeAnomalyDetectorsResponse
Prelude.Read, Int -> DescribeAnomalyDetectorsResponse -> ShowS
[DescribeAnomalyDetectorsResponse] -> ShowS
DescribeAnomalyDetectorsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAnomalyDetectorsResponse] -> ShowS
$cshowList :: [DescribeAnomalyDetectorsResponse] -> ShowS
show :: DescribeAnomalyDetectorsResponse -> String
$cshow :: DescribeAnomalyDetectorsResponse -> String
showsPrec :: Int -> DescribeAnomalyDetectorsResponse -> ShowS
$cshowsPrec :: Int -> DescribeAnomalyDetectorsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeAnomalyDetectorsResponse x
-> DescribeAnomalyDetectorsResponse
forall x.
DescribeAnomalyDetectorsResponse
-> Rep DescribeAnomalyDetectorsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAnomalyDetectorsResponse x
-> DescribeAnomalyDetectorsResponse
$cfrom :: forall x.
DescribeAnomalyDetectorsResponse
-> Rep DescribeAnomalyDetectorsResponse x
Prelude.Generic)
newDescribeAnomalyDetectorsResponse ::
Prelude.Int ->
DescribeAnomalyDetectorsResponse
newDescribeAnomalyDetectorsResponse :: Int -> DescribeAnomalyDetectorsResponse
newDescribeAnomalyDetectorsResponse Int
pHttpStatus_ =
DescribeAnomalyDetectorsResponse'
{ $sel:anomalyDetectors:DescribeAnomalyDetectorsResponse' :: Maybe [AnomalyDetector]
anomalyDetectors =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeAnomalyDetectorsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAnomalyDetectorsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAnomalyDetectorsResponse_anomalyDetectors :: Lens.Lens' DescribeAnomalyDetectorsResponse (Prelude.Maybe [AnomalyDetector])
describeAnomalyDetectorsResponse_anomalyDetectors :: Lens' DescribeAnomalyDetectorsResponse (Maybe [AnomalyDetector])
describeAnomalyDetectorsResponse_anomalyDetectors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAnomalyDetectorsResponse' {Maybe [AnomalyDetector]
anomalyDetectors :: Maybe [AnomalyDetector]
$sel:anomalyDetectors:DescribeAnomalyDetectorsResponse' :: DescribeAnomalyDetectorsResponse -> Maybe [AnomalyDetector]
anomalyDetectors} -> Maybe [AnomalyDetector]
anomalyDetectors) (\s :: DescribeAnomalyDetectorsResponse
s@DescribeAnomalyDetectorsResponse' {} Maybe [AnomalyDetector]
a -> DescribeAnomalyDetectorsResponse
s {$sel:anomalyDetectors:DescribeAnomalyDetectorsResponse' :: Maybe [AnomalyDetector]
anomalyDetectors = Maybe [AnomalyDetector]
a} :: DescribeAnomalyDetectorsResponse) 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
describeAnomalyDetectorsResponse_nextToken :: Lens.Lens' DescribeAnomalyDetectorsResponse (Prelude.Maybe Prelude.Text)
describeAnomalyDetectorsResponse_nextToken :: Lens' DescribeAnomalyDetectorsResponse (Maybe Text)
describeAnomalyDetectorsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAnomalyDetectorsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAnomalyDetectorsResponse' :: DescribeAnomalyDetectorsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAnomalyDetectorsResponse
s@DescribeAnomalyDetectorsResponse' {} Maybe Text
a -> DescribeAnomalyDetectorsResponse
s {$sel:nextToken:DescribeAnomalyDetectorsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAnomalyDetectorsResponse)
describeAnomalyDetectorsResponse_httpStatus :: Lens.Lens' DescribeAnomalyDetectorsResponse Prelude.Int
describeAnomalyDetectorsResponse_httpStatus :: Lens' DescribeAnomalyDetectorsResponse Int
describeAnomalyDetectorsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAnomalyDetectorsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAnomalyDetectorsResponse' :: DescribeAnomalyDetectorsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAnomalyDetectorsResponse
s@DescribeAnomalyDetectorsResponse' {} Int
a -> DescribeAnomalyDetectorsResponse
s {$sel:httpStatus:DescribeAnomalyDetectorsResponse' :: Int
httpStatus = Int
a} :: DescribeAnomalyDetectorsResponse)
instance
Prelude.NFData
DescribeAnomalyDetectorsResponse
where
rnf :: DescribeAnomalyDetectorsResponse -> ()
rnf DescribeAnomalyDetectorsResponse' {Int
Maybe [AnomalyDetector]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
anomalyDetectors :: Maybe [AnomalyDetector]
$sel:httpStatus:DescribeAnomalyDetectorsResponse' :: DescribeAnomalyDetectorsResponse -> Int
$sel:nextToken:DescribeAnomalyDetectorsResponse' :: DescribeAnomalyDetectorsResponse -> Maybe Text
$sel:anomalyDetectors:DescribeAnomalyDetectorsResponse' :: DescribeAnomalyDetectorsResponse -> Maybe [AnomalyDetector]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [AnomalyDetector]
anomalyDetectors
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus