{-# 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.GetMetricData
(
GetMetricData (..),
newGetMetricData,
getMetricData_labelOptions,
getMetricData_maxDatapoints,
getMetricData_nextToken,
getMetricData_scanBy,
getMetricData_metricDataQueries,
getMetricData_startTime,
getMetricData_endTime,
GetMetricDataResponse (..),
newGetMetricDataResponse,
getMetricDataResponse_messages,
getMetricDataResponse_metricDataResults,
getMetricDataResponse_nextToken,
getMetricDataResponse_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 GetMetricData = GetMetricData'
{
GetMetricData -> Maybe LabelOptions
labelOptions :: Prelude.Maybe LabelOptions,
GetMetricData -> Maybe Int
maxDatapoints :: Prelude.Maybe Prelude.Int,
GetMetricData -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetMetricData -> Maybe ScanBy
scanBy :: Prelude.Maybe ScanBy,
GetMetricData -> [MetricDataQuery]
metricDataQueries :: [MetricDataQuery],
GetMetricData -> ISO8601
startTime :: Data.ISO8601,
GetMetricData -> ISO8601
endTime :: Data.ISO8601
}
deriving (GetMetricData -> GetMetricData -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMetricData -> GetMetricData -> Bool
$c/= :: GetMetricData -> GetMetricData -> Bool
== :: GetMetricData -> GetMetricData -> Bool
$c== :: GetMetricData -> GetMetricData -> Bool
Prelude.Eq, ReadPrec [GetMetricData]
ReadPrec GetMetricData
Int -> ReadS GetMetricData
ReadS [GetMetricData]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMetricData]
$creadListPrec :: ReadPrec [GetMetricData]
readPrec :: ReadPrec GetMetricData
$creadPrec :: ReadPrec GetMetricData
readList :: ReadS [GetMetricData]
$creadList :: ReadS [GetMetricData]
readsPrec :: Int -> ReadS GetMetricData
$creadsPrec :: Int -> ReadS GetMetricData
Prelude.Read, Int -> GetMetricData -> ShowS
[GetMetricData] -> ShowS
GetMetricData -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMetricData] -> ShowS
$cshowList :: [GetMetricData] -> ShowS
show :: GetMetricData -> String
$cshow :: GetMetricData -> String
showsPrec :: Int -> GetMetricData -> ShowS
$cshowsPrec :: Int -> GetMetricData -> ShowS
Prelude.Show, forall x. Rep GetMetricData x -> GetMetricData
forall x. GetMetricData -> Rep GetMetricData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMetricData x -> GetMetricData
$cfrom :: forall x. GetMetricData -> Rep GetMetricData x
Prelude.Generic)
newGetMetricData ::
Prelude.UTCTime ->
Prelude.UTCTime ->
GetMetricData
newGetMetricData :: UTCTime -> UTCTime -> GetMetricData
newGetMetricData UTCTime
pStartTime_ UTCTime
pEndTime_ =
GetMetricData'
{ $sel:labelOptions:GetMetricData' :: Maybe LabelOptions
labelOptions = forall a. Maybe a
Prelude.Nothing,
$sel:maxDatapoints:GetMetricData' :: Maybe Int
maxDatapoints = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetMetricData' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:scanBy:GetMetricData' :: Maybe ScanBy
scanBy = forall a. Maybe a
Prelude.Nothing,
$sel:metricDataQueries:GetMetricData' :: [MetricDataQuery]
metricDataQueries = forall a. Monoid a => a
Prelude.mempty,
$sel:startTime:GetMetricData' :: ISO8601
startTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
$sel:endTime:GetMetricData' :: ISO8601
endTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndTime_
}
getMetricData_labelOptions :: Lens.Lens' GetMetricData (Prelude.Maybe LabelOptions)
getMetricData_labelOptions :: Lens' GetMetricData (Maybe LabelOptions)
getMetricData_labelOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMetricData' {Maybe LabelOptions
labelOptions :: Maybe LabelOptions
$sel:labelOptions:GetMetricData' :: GetMetricData -> Maybe LabelOptions
labelOptions} -> Maybe LabelOptions
labelOptions) (\s :: GetMetricData
s@GetMetricData' {} Maybe LabelOptions
a -> GetMetricData
s {$sel:labelOptions:GetMetricData' :: Maybe LabelOptions
labelOptions = Maybe LabelOptions
a} :: GetMetricData)
getMetricData_maxDatapoints :: Lens.Lens' GetMetricData (Prelude.Maybe Prelude.Int)
getMetricData_maxDatapoints :: Lens' GetMetricData (Maybe Int)
getMetricData_maxDatapoints = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMetricData' {Maybe Int
maxDatapoints :: Maybe Int
$sel:maxDatapoints:GetMetricData' :: GetMetricData -> Maybe Int
maxDatapoints} -> Maybe Int
maxDatapoints) (\s :: GetMetricData
s@GetMetricData' {} Maybe Int
a -> GetMetricData
s {$sel:maxDatapoints:GetMetricData' :: Maybe Int
maxDatapoints = Maybe Int
a} :: GetMetricData)
getMetricData_nextToken :: Lens.Lens' GetMetricData (Prelude.Maybe Prelude.Text)
getMetricData_nextToken :: Lens' GetMetricData (Maybe Text)
getMetricData_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMetricData' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetMetricData' :: GetMetricData -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetMetricData
s@GetMetricData' {} Maybe Text
a -> GetMetricData
s {$sel:nextToken:GetMetricData' :: Maybe Text
nextToken = Maybe Text
a} :: GetMetricData)
getMetricData_scanBy :: Lens.Lens' GetMetricData (Prelude.Maybe ScanBy)
getMetricData_scanBy :: Lens' GetMetricData (Maybe ScanBy)
getMetricData_scanBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMetricData' {Maybe ScanBy
scanBy :: Maybe ScanBy
$sel:scanBy:GetMetricData' :: GetMetricData -> Maybe ScanBy
scanBy} -> Maybe ScanBy
scanBy) (\s :: GetMetricData
s@GetMetricData' {} Maybe ScanBy
a -> GetMetricData
s {$sel:scanBy:GetMetricData' :: Maybe ScanBy
scanBy = Maybe ScanBy
a} :: GetMetricData)
getMetricData_metricDataQueries :: Lens.Lens' GetMetricData [MetricDataQuery]
getMetricData_metricDataQueries :: Lens' GetMetricData [MetricDataQuery]
getMetricData_metricDataQueries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMetricData' {[MetricDataQuery]
metricDataQueries :: [MetricDataQuery]
$sel:metricDataQueries:GetMetricData' :: GetMetricData -> [MetricDataQuery]
metricDataQueries} -> [MetricDataQuery]
metricDataQueries) (\s :: GetMetricData
s@GetMetricData' {} [MetricDataQuery]
a -> GetMetricData
s {$sel:metricDataQueries:GetMetricData' :: [MetricDataQuery]
metricDataQueries = [MetricDataQuery]
a} :: GetMetricData) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getMetricData_startTime :: Lens.Lens' GetMetricData Prelude.UTCTime
getMetricData_startTime :: Lens' GetMetricData UTCTime
getMetricData_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMetricData' {ISO8601
startTime :: ISO8601
$sel:startTime:GetMetricData' :: GetMetricData -> ISO8601
startTime} -> ISO8601
startTime) (\s :: GetMetricData
s@GetMetricData' {} ISO8601
a -> GetMetricData
s {$sel:startTime:GetMetricData' :: ISO8601
startTime = ISO8601
a} :: GetMetricData) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
getMetricData_endTime :: Lens.Lens' GetMetricData Prelude.UTCTime
getMetricData_endTime :: Lens' GetMetricData UTCTime
getMetricData_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMetricData' {ISO8601
endTime :: ISO8601
$sel:endTime:GetMetricData' :: GetMetricData -> ISO8601
endTime} -> ISO8601
endTime) (\s :: GetMetricData
s@GetMetricData' {} ISO8601
a -> GetMetricData
s {$sel:endTime:GetMetricData' :: ISO8601
endTime = ISO8601
a} :: GetMetricData) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Core.AWSPager GetMetricData where
page :: GetMetricData -> AWSResponse GetMetricData -> Maybe GetMetricData
page GetMetricData
rq AWSResponse GetMetricData
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetMetricData
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetMetricDataResponse (Maybe Text)
getMetricDataResponse_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 GetMetricData
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetMetricDataResponse (Maybe [MetricDataResult])
getMetricDataResponse_metricDataResults
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 GetMetricData
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetMetricDataResponse (Maybe [MessageData])
getMetricDataResponse_messages
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.$ GetMetricData
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetMetricData (Maybe Text)
getMetricData_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetMetricData
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetMetricDataResponse (Maybe Text)
getMetricDataResponse_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 GetMetricData where
type
AWSResponse GetMetricData =
GetMetricDataResponse
request :: (Service -> Service) -> GetMetricData -> Request GetMetricData
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 GetMetricData
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetMetricData)))
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
"GetMetricDataResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [MessageData]
-> Maybe [MetricDataResult]
-> Maybe Text
-> Int
-> GetMetricDataResponse
GetMetricDataResponse'
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
"Messages"
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
"MetricDataResults"
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 GetMetricData where
hashWithSalt :: Int -> GetMetricData -> Int
hashWithSalt Int
_salt GetMetricData' {[MetricDataQuery]
Maybe Int
Maybe Text
Maybe LabelOptions
Maybe ScanBy
ISO8601
endTime :: ISO8601
startTime :: ISO8601
metricDataQueries :: [MetricDataQuery]
scanBy :: Maybe ScanBy
nextToken :: Maybe Text
maxDatapoints :: Maybe Int
labelOptions :: Maybe LabelOptions
$sel:endTime:GetMetricData' :: GetMetricData -> ISO8601
$sel:startTime:GetMetricData' :: GetMetricData -> ISO8601
$sel:metricDataQueries:GetMetricData' :: GetMetricData -> [MetricDataQuery]
$sel:scanBy:GetMetricData' :: GetMetricData -> Maybe ScanBy
$sel:nextToken:GetMetricData' :: GetMetricData -> Maybe Text
$sel:maxDatapoints:GetMetricData' :: GetMetricData -> Maybe Int
$sel:labelOptions:GetMetricData' :: GetMetricData -> Maybe LabelOptions
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LabelOptions
labelOptions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxDatapoints
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScanBy
scanBy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [MetricDataQuery]
metricDataQueries
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
startTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
endTime
instance Prelude.NFData GetMetricData where
rnf :: GetMetricData -> ()
rnf GetMetricData' {[MetricDataQuery]
Maybe Int
Maybe Text
Maybe LabelOptions
Maybe ScanBy
ISO8601
endTime :: ISO8601
startTime :: ISO8601
metricDataQueries :: [MetricDataQuery]
scanBy :: Maybe ScanBy
nextToken :: Maybe Text
maxDatapoints :: Maybe Int
labelOptions :: Maybe LabelOptions
$sel:endTime:GetMetricData' :: GetMetricData -> ISO8601
$sel:startTime:GetMetricData' :: GetMetricData -> ISO8601
$sel:metricDataQueries:GetMetricData' :: GetMetricData -> [MetricDataQuery]
$sel:scanBy:GetMetricData' :: GetMetricData -> Maybe ScanBy
$sel:nextToken:GetMetricData' :: GetMetricData -> Maybe Text
$sel:maxDatapoints:GetMetricData' :: GetMetricData -> Maybe Int
$sel:labelOptions:GetMetricData' :: GetMetricData -> Maybe LabelOptions
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe LabelOptions
labelOptions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxDatapoints
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 Maybe ScanBy
scanBy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [MetricDataQuery]
metricDataQueries
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
startTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
endTime
instance Data.ToHeaders GetMetricData where
toHeaders :: GetMetricData -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath GetMetricData where
toPath :: GetMetricData -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetMetricData where
toQuery :: GetMetricData -> QueryString
toQuery GetMetricData' {[MetricDataQuery]
Maybe Int
Maybe Text
Maybe LabelOptions
Maybe ScanBy
ISO8601
endTime :: ISO8601
startTime :: ISO8601
metricDataQueries :: [MetricDataQuery]
scanBy :: Maybe ScanBy
nextToken :: Maybe Text
maxDatapoints :: Maybe Int
labelOptions :: Maybe LabelOptions
$sel:endTime:GetMetricData' :: GetMetricData -> ISO8601
$sel:startTime:GetMetricData' :: GetMetricData -> ISO8601
$sel:metricDataQueries:GetMetricData' :: GetMetricData -> [MetricDataQuery]
$sel:scanBy:GetMetricData' :: GetMetricData -> Maybe ScanBy
$sel:nextToken:GetMetricData' :: GetMetricData -> Maybe Text
$sel:maxDatapoints:GetMetricData' :: GetMetricData -> Maybe Int
$sel:labelOptions:GetMetricData' :: GetMetricData -> Maybe LabelOptions
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"GetMetricData" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-08-01" :: Prelude.ByteString),
ByteString
"LabelOptions" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe LabelOptions
labelOptions,
ByteString
"MaxDatapoints" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxDatapoints,
ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
ByteString
"ScanBy" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ScanBy
scanBy,
ByteString
"MetricDataQueries"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" [MetricDataQuery]
metricDataQueries,
ByteString
"StartTime" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ISO8601
startTime,
ByteString
"EndTime" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ISO8601
endTime
]
data GetMetricDataResponse = GetMetricDataResponse'
{
GetMetricDataResponse -> Maybe [MessageData]
messages :: Prelude.Maybe [MessageData],
GetMetricDataResponse -> Maybe [MetricDataResult]
metricDataResults :: Prelude.Maybe [MetricDataResult],
GetMetricDataResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetMetricDataResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetMetricDataResponse -> GetMetricDataResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMetricDataResponse -> GetMetricDataResponse -> Bool
$c/= :: GetMetricDataResponse -> GetMetricDataResponse -> Bool
== :: GetMetricDataResponse -> GetMetricDataResponse -> Bool
$c== :: GetMetricDataResponse -> GetMetricDataResponse -> Bool
Prelude.Eq, ReadPrec [GetMetricDataResponse]
ReadPrec GetMetricDataResponse
Int -> ReadS GetMetricDataResponse
ReadS [GetMetricDataResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMetricDataResponse]
$creadListPrec :: ReadPrec [GetMetricDataResponse]
readPrec :: ReadPrec GetMetricDataResponse
$creadPrec :: ReadPrec GetMetricDataResponse
readList :: ReadS [GetMetricDataResponse]
$creadList :: ReadS [GetMetricDataResponse]
readsPrec :: Int -> ReadS GetMetricDataResponse
$creadsPrec :: Int -> ReadS GetMetricDataResponse
Prelude.Read, Int -> GetMetricDataResponse -> ShowS
[GetMetricDataResponse] -> ShowS
GetMetricDataResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMetricDataResponse] -> ShowS
$cshowList :: [GetMetricDataResponse] -> ShowS
show :: GetMetricDataResponse -> String
$cshow :: GetMetricDataResponse -> String
showsPrec :: Int -> GetMetricDataResponse -> ShowS
$cshowsPrec :: Int -> GetMetricDataResponse -> ShowS
Prelude.Show, forall x. Rep GetMetricDataResponse x -> GetMetricDataResponse
forall x. GetMetricDataResponse -> Rep GetMetricDataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMetricDataResponse x -> GetMetricDataResponse
$cfrom :: forall x. GetMetricDataResponse -> Rep GetMetricDataResponse x
Prelude.Generic)
newGetMetricDataResponse ::
Prelude.Int ->
GetMetricDataResponse
newGetMetricDataResponse :: Int -> GetMetricDataResponse
newGetMetricDataResponse Int
pHttpStatus_ =
GetMetricDataResponse'
{ $sel:messages:GetMetricDataResponse' :: Maybe [MessageData]
messages = forall a. Maybe a
Prelude.Nothing,
$sel:metricDataResults:GetMetricDataResponse' :: Maybe [MetricDataResult]
metricDataResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetMetricDataResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetMetricDataResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getMetricDataResponse_messages :: Lens.Lens' GetMetricDataResponse (Prelude.Maybe [MessageData])
getMetricDataResponse_messages :: Lens' GetMetricDataResponse (Maybe [MessageData])
getMetricDataResponse_messages = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMetricDataResponse' {Maybe [MessageData]
messages :: Maybe [MessageData]
$sel:messages:GetMetricDataResponse' :: GetMetricDataResponse -> Maybe [MessageData]
messages} -> Maybe [MessageData]
messages) (\s :: GetMetricDataResponse
s@GetMetricDataResponse' {} Maybe [MessageData]
a -> GetMetricDataResponse
s {$sel:messages:GetMetricDataResponse' :: Maybe [MessageData]
messages = Maybe [MessageData]
a} :: GetMetricDataResponse) 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
getMetricDataResponse_metricDataResults :: Lens.Lens' GetMetricDataResponse (Prelude.Maybe [MetricDataResult])
getMetricDataResponse_metricDataResults :: Lens' GetMetricDataResponse (Maybe [MetricDataResult])
getMetricDataResponse_metricDataResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMetricDataResponse' {Maybe [MetricDataResult]
metricDataResults :: Maybe [MetricDataResult]
$sel:metricDataResults:GetMetricDataResponse' :: GetMetricDataResponse -> Maybe [MetricDataResult]
metricDataResults} -> Maybe [MetricDataResult]
metricDataResults) (\s :: GetMetricDataResponse
s@GetMetricDataResponse' {} Maybe [MetricDataResult]
a -> GetMetricDataResponse
s {$sel:metricDataResults:GetMetricDataResponse' :: Maybe [MetricDataResult]
metricDataResults = Maybe [MetricDataResult]
a} :: GetMetricDataResponse) 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
getMetricDataResponse_nextToken :: Lens.Lens' GetMetricDataResponse (Prelude.Maybe Prelude.Text)
getMetricDataResponse_nextToken :: Lens' GetMetricDataResponse (Maybe Text)
getMetricDataResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMetricDataResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetMetricDataResponse' :: GetMetricDataResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetMetricDataResponse
s@GetMetricDataResponse' {} Maybe Text
a -> GetMetricDataResponse
s {$sel:nextToken:GetMetricDataResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetMetricDataResponse)
getMetricDataResponse_httpStatus :: Lens.Lens' GetMetricDataResponse Prelude.Int
getMetricDataResponse_httpStatus :: Lens' GetMetricDataResponse Int
getMetricDataResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMetricDataResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetMetricDataResponse' :: GetMetricDataResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetMetricDataResponse
s@GetMetricDataResponse' {} Int
a -> GetMetricDataResponse
s {$sel:httpStatus:GetMetricDataResponse' :: Int
httpStatus = Int
a} :: GetMetricDataResponse)
instance Prelude.NFData GetMetricDataResponse where
rnf :: GetMetricDataResponse -> ()
rnf GetMetricDataResponse' {Int
Maybe [MessageData]
Maybe [MetricDataResult]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
metricDataResults :: Maybe [MetricDataResult]
messages :: Maybe [MessageData]
$sel:httpStatus:GetMetricDataResponse' :: GetMetricDataResponse -> Int
$sel:nextToken:GetMetricDataResponse' :: GetMetricDataResponse -> Maybe Text
$sel:metricDataResults:GetMetricDataResponse' :: GetMetricDataResponse -> Maybe [MetricDataResult]
$sel:messages:GetMetricDataResponse' :: GetMetricDataResponse -> Maybe [MessageData]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [MessageData]
messages
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [MetricDataResult]
metricDataResults
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