{-# 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.Lightsail.GetDistributionMetricData
(
GetDistributionMetricData (..),
newGetDistributionMetricData,
getDistributionMetricData_distributionName,
getDistributionMetricData_metricName,
getDistributionMetricData_startTime,
getDistributionMetricData_endTime,
getDistributionMetricData_period,
getDistributionMetricData_unit,
getDistributionMetricData_statistics,
GetDistributionMetricDataResponse (..),
newGetDistributionMetricDataResponse,
getDistributionMetricDataResponse_metricName,
getDistributionMetricDataResponse_metricData,
getDistributionMetricDataResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetDistributionMetricData = GetDistributionMetricData'
{
GetDistributionMetricData -> Text
distributionName :: Prelude.Text,
GetDistributionMetricData -> DistributionMetricName
metricName :: DistributionMetricName,
GetDistributionMetricData -> POSIX
startTime :: Core.POSIX,
GetDistributionMetricData -> POSIX
endTime :: Core.POSIX,
GetDistributionMetricData -> Natural
period :: Prelude.Natural,
GetDistributionMetricData -> MetricUnit
unit :: MetricUnit,
GetDistributionMetricData -> [MetricStatistic]
statistics :: [MetricStatistic]
}
deriving (GetDistributionMetricData -> GetDistributionMetricData -> Bool
(GetDistributionMetricData -> GetDistributionMetricData -> Bool)
-> (GetDistributionMetricData -> GetDistributionMetricData -> Bool)
-> Eq GetDistributionMetricData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDistributionMetricData -> GetDistributionMetricData -> Bool
$c/= :: GetDistributionMetricData -> GetDistributionMetricData -> Bool
== :: GetDistributionMetricData -> GetDistributionMetricData -> Bool
$c== :: GetDistributionMetricData -> GetDistributionMetricData -> Bool
Prelude.Eq, ReadPrec [GetDistributionMetricData]
ReadPrec GetDistributionMetricData
Int -> ReadS GetDistributionMetricData
ReadS [GetDistributionMetricData]
(Int -> ReadS GetDistributionMetricData)
-> ReadS [GetDistributionMetricData]
-> ReadPrec GetDistributionMetricData
-> ReadPrec [GetDistributionMetricData]
-> Read GetDistributionMetricData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDistributionMetricData]
$creadListPrec :: ReadPrec [GetDistributionMetricData]
readPrec :: ReadPrec GetDistributionMetricData
$creadPrec :: ReadPrec GetDistributionMetricData
readList :: ReadS [GetDistributionMetricData]
$creadList :: ReadS [GetDistributionMetricData]
readsPrec :: Int -> ReadS GetDistributionMetricData
$creadsPrec :: Int -> ReadS GetDistributionMetricData
Prelude.Read, Int -> GetDistributionMetricData -> ShowS
[GetDistributionMetricData] -> ShowS
GetDistributionMetricData -> String
(Int -> GetDistributionMetricData -> ShowS)
-> (GetDistributionMetricData -> String)
-> ([GetDistributionMetricData] -> ShowS)
-> Show GetDistributionMetricData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDistributionMetricData] -> ShowS
$cshowList :: [GetDistributionMetricData] -> ShowS
show :: GetDistributionMetricData -> String
$cshow :: GetDistributionMetricData -> String
showsPrec :: Int -> GetDistributionMetricData -> ShowS
$cshowsPrec :: Int -> GetDistributionMetricData -> ShowS
Prelude.Show, (forall x.
GetDistributionMetricData -> Rep GetDistributionMetricData x)
-> (forall x.
Rep GetDistributionMetricData x -> GetDistributionMetricData)
-> Generic GetDistributionMetricData
forall x.
Rep GetDistributionMetricData x -> GetDistributionMetricData
forall x.
GetDistributionMetricData -> Rep GetDistributionMetricData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDistributionMetricData x -> GetDistributionMetricData
$cfrom :: forall x.
GetDistributionMetricData -> Rep GetDistributionMetricData x
Prelude.Generic)
newGetDistributionMetricData ::
Prelude.Text ->
DistributionMetricName ->
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Natural ->
MetricUnit ->
GetDistributionMetricData
newGetDistributionMetricData :: Text
-> DistributionMetricName
-> UTCTime
-> UTCTime
-> Natural
-> MetricUnit
-> GetDistributionMetricData
newGetDistributionMetricData
Text
pDistributionName_
DistributionMetricName
pMetricName_
UTCTime
pStartTime_
UTCTime
pEndTime_
Natural
pPeriod_
MetricUnit
pUnit_ =
GetDistributionMetricData' :: Text
-> DistributionMetricName
-> POSIX
-> POSIX
-> Natural
-> MetricUnit
-> [MetricStatistic]
-> GetDistributionMetricData
GetDistributionMetricData'
{ $sel:distributionName:GetDistributionMetricData' :: Text
distributionName =
Text
pDistributionName_,
$sel:metricName:GetDistributionMetricData' :: DistributionMetricName
metricName = DistributionMetricName
pMetricName_,
$sel:startTime:GetDistributionMetricData' :: POSIX
startTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
$sel:endTime:GetDistributionMetricData' :: POSIX
endTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndTime_,
$sel:period:GetDistributionMetricData' :: Natural
period = Natural
pPeriod_,
$sel:unit:GetDistributionMetricData' :: MetricUnit
unit = MetricUnit
pUnit_,
$sel:statistics:GetDistributionMetricData' :: [MetricStatistic]
statistics = [MetricStatistic]
forall a. Monoid a => a
Prelude.mempty
}
getDistributionMetricData_distributionName :: Lens.Lens' GetDistributionMetricData Prelude.Text
getDistributionMetricData_distributionName :: (Text -> f Text)
-> GetDistributionMetricData -> f GetDistributionMetricData
getDistributionMetricData_distributionName = (GetDistributionMetricData -> Text)
-> (GetDistributionMetricData -> Text -> GetDistributionMetricData)
-> Lens
GetDistributionMetricData GetDistributionMetricData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionMetricData' {Text
distributionName :: Text
$sel:distributionName:GetDistributionMetricData' :: GetDistributionMetricData -> Text
distributionName} -> Text
distributionName) (\s :: GetDistributionMetricData
s@GetDistributionMetricData' {} Text
a -> GetDistributionMetricData
s {$sel:distributionName:GetDistributionMetricData' :: Text
distributionName = Text
a} :: GetDistributionMetricData)
getDistributionMetricData_metricName :: Lens.Lens' GetDistributionMetricData DistributionMetricName
getDistributionMetricData_metricName :: (DistributionMetricName -> f DistributionMetricName)
-> GetDistributionMetricData -> f GetDistributionMetricData
getDistributionMetricData_metricName = (GetDistributionMetricData -> DistributionMetricName)
-> (GetDistributionMetricData
-> DistributionMetricName -> GetDistributionMetricData)
-> Lens
GetDistributionMetricData
GetDistributionMetricData
DistributionMetricName
DistributionMetricName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionMetricData' {DistributionMetricName
metricName :: DistributionMetricName
$sel:metricName:GetDistributionMetricData' :: GetDistributionMetricData -> DistributionMetricName
metricName} -> DistributionMetricName
metricName) (\s :: GetDistributionMetricData
s@GetDistributionMetricData' {} DistributionMetricName
a -> GetDistributionMetricData
s {$sel:metricName:GetDistributionMetricData' :: DistributionMetricName
metricName = DistributionMetricName
a} :: GetDistributionMetricData)
getDistributionMetricData_startTime :: Lens.Lens' GetDistributionMetricData Prelude.UTCTime
getDistributionMetricData_startTime :: (UTCTime -> f UTCTime)
-> GetDistributionMetricData -> f GetDistributionMetricData
getDistributionMetricData_startTime = (GetDistributionMetricData -> POSIX)
-> (GetDistributionMetricData
-> POSIX -> GetDistributionMetricData)
-> Lens
GetDistributionMetricData GetDistributionMetricData POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionMetricData' {POSIX
startTime :: POSIX
$sel:startTime:GetDistributionMetricData' :: GetDistributionMetricData -> POSIX
startTime} -> POSIX
startTime) (\s :: GetDistributionMetricData
s@GetDistributionMetricData' {} POSIX
a -> GetDistributionMetricData
s {$sel:startTime:GetDistributionMetricData' :: POSIX
startTime = POSIX
a} :: GetDistributionMetricData) ((POSIX -> f POSIX)
-> GetDistributionMetricData -> f GetDistributionMetricData)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetDistributionMetricData
-> f GetDistributionMetricData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
getDistributionMetricData_endTime :: Lens.Lens' GetDistributionMetricData Prelude.UTCTime
getDistributionMetricData_endTime :: (UTCTime -> f UTCTime)
-> GetDistributionMetricData -> f GetDistributionMetricData
getDistributionMetricData_endTime = (GetDistributionMetricData -> POSIX)
-> (GetDistributionMetricData
-> POSIX -> GetDistributionMetricData)
-> Lens
GetDistributionMetricData GetDistributionMetricData POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionMetricData' {POSIX
endTime :: POSIX
$sel:endTime:GetDistributionMetricData' :: GetDistributionMetricData -> POSIX
endTime} -> POSIX
endTime) (\s :: GetDistributionMetricData
s@GetDistributionMetricData' {} POSIX
a -> GetDistributionMetricData
s {$sel:endTime:GetDistributionMetricData' :: POSIX
endTime = POSIX
a} :: GetDistributionMetricData) ((POSIX -> f POSIX)
-> GetDistributionMetricData -> f GetDistributionMetricData)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetDistributionMetricData
-> f GetDistributionMetricData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
getDistributionMetricData_period :: Lens.Lens' GetDistributionMetricData Prelude.Natural
getDistributionMetricData_period :: (Natural -> f Natural)
-> GetDistributionMetricData -> f GetDistributionMetricData
getDistributionMetricData_period = (GetDistributionMetricData -> Natural)
-> (GetDistributionMetricData
-> Natural -> GetDistributionMetricData)
-> Lens
GetDistributionMetricData GetDistributionMetricData Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionMetricData' {Natural
period :: Natural
$sel:period:GetDistributionMetricData' :: GetDistributionMetricData -> Natural
period} -> Natural
period) (\s :: GetDistributionMetricData
s@GetDistributionMetricData' {} Natural
a -> GetDistributionMetricData
s {$sel:period:GetDistributionMetricData' :: Natural
period = Natural
a} :: GetDistributionMetricData)
getDistributionMetricData_unit :: Lens.Lens' GetDistributionMetricData MetricUnit
getDistributionMetricData_unit :: (MetricUnit -> f MetricUnit)
-> GetDistributionMetricData -> f GetDistributionMetricData
getDistributionMetricData_unit = (GetDistributionMetricData -> MetricUnit)
-> (GetDistributionMetricData
-> MetricUnit -> GetDistributionMetricData)
-> Lens
GetDistributionMetricData
GetDistributionMetricData
MetricUnit
MetricUnit
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionMetricData' {MetricUnit
unit :: MetricUnit
$sel:unit:GetDistributionMetricData' :: GetDistributionMetricData -> MetricUnit
unit} -> MetricUnit
unit) (\s :: GetDistributionMetricData
s@GetDistributionMetricData' {} MetricUnit
a -> GetDistributionMetricData
s {$sel:unit:GetDistributionMetricData' :: MetricUnit
unit = MetricUnit
a} :: GetDistributionMetricData)
getDistributionMetricData_statistics :: Lens.Lens' GetDistributionMetricData [MetricStatistic]
getDistributionMetricData_statistics :: ([MetricStatistic] -> f [MetricStatistic])
-> GetDistributionMetricData -> f GetDistributionMetricData
getDistributionMetricData_statistics = (GetDistributionMetricData -> [MetricStatistic])
-> (GetDistributionMetricData
-> [MetricStatistic] -> GetDistributionMetricData)
-> Lens
GetDistributionMetricData
GetDistributionMetricData
[MetricStatistic]
[MetricStatistic]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionMetricData' {[MetricStatistic]
statistics :: [MetricStatistic]
$sel:statistics:GetDistributionMetricData' :: GetDistributionMetricData -> [MetricStatistic]
statistics} -> [MetricStatistic]
statistics) (\s :: GetDistributionMetricData
s@GetDistributionMetricData' {} [MetricStatistic]
a -> GetDistributionMetricData
s {$sel:statistics:GetDistributionMetricData' :: [MetricStatistic]
statistics = [MetricStatistic]
a} :: GetDistributionMetricData) (([MetricStatistic] -> f [MetricStatistic])
-> GetDistributionMetricData -> f GetDistributionMetricData)
-> (([MetricStatistic] -> f [MetricStatistic])
-> [MetricStatistic] -> f [MetricStatistic])
-> ([MetricStatistic] -> f [MetricStatistic])
-> GetDistributionMetricData
-> f GetDistributionMetricData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MetricStatistic] -> f [MetricStatistic])
-> [MetricStatistic] -> f [MetricStatistic]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest GetDistributionMetricData where
type
AWSResponse GetDistributionMetricData =
GetDistributionMetricDataResponse
request :: GetDistributionMetricData -> Request GetDistributionMetricData
request = Service
-> GetDistributionMetricData -> Request GetDistributionMetricData
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetDistributionMetricData
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDistributionMetricData)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetDistributionMetricData))
-> Logger
-> Service
-> Proxy GetDistributionMetricData
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDistributionMetricData)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe DistributionMetricName
-> Maybe [MetricDatapoint]
-> Int
-> GetDistributionMetricDataResponse
GetDistributionMetricDataResponse'
(Maybe DistributionMetricName
-> Maybe [MetricDatapoint]
-> Int
-> GetDistributionMetricDataResponse)
-> Either String (Maybe DistributionMetricName)
-> Either
String
(Maybe [MetricDatapoint]
-> Int -> GetDistributionMetricDataResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe DistributionMetricName)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"metricName")
Either
String
(Maybe [MetricDatapoint]
-> Int -> GetDistributionMetricDataResponse)
-> Either String (Maybe [MetricDatapoint])
-> Either String (Int -> GetDistributionMetricDataResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [MetricDatapoint]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"metricData" Either String (Maybe (Maybe [MetricDatapoint]))
-> Maybe [MetricDatapoint]
-> Either String (Maybe [MetricDatapoint])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MetricDatapoint]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> GetDistributionMetricDataResponse)
-> Either String Int
-> Either String GetDistributionMetricDataResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable GetDistributionMetricData
instance Prelude.NFData GetDistributionMetricData
instance Core.ToHeaders GetDistributionMetricData where
toHeaders :: GetDistributionMetricData -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetDistributionMetricData -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Lightsail_20161128.GetDistributionMetricData" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON GetDistributionMetricData where
toJSON :: GetDistributionMetricData -> Value
toJSON GetDistributionMetricData' {Natural
[MetricStatistic]
Text
POSIX
DistributionMetricName
MetricUnit
statistics :: [MetricStatistic]
unit :: MetricUnit
period :: Natural
endTime :: POSIX
startTime :: POSIX
metricName :: DistributionMetricName
distributionName :: Text
$sel:statistics:GetDistributionMetricData' :: GetDistributionMetricData -> [MetricStatistic]
$sel:unit:GetDistributionMetricData' :: GetDistributionMetricData -> MetricUnit
$sel:period:GetDistributionMetricData' :: GetDistributionMetricData -> Natural
$sel:endTime:GetDistributionMetricData' :: GetDistributionMetricData -> POSIX
$sel:startTime:GetDistributionMetricData' :: GetDistributionMetricData -> POSIX
$sel:metricName:GetDistributionMetricData' :: GetDistributionMetricData -> DistributionMetricName
$sel:distributionName:GetDistributionMetricData' :: GetDistributionMetricData -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"distributionName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
distributionName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"metricName" Text -> DistributionMetricName -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DistributionMetricName
metricName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"startTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= POSIX
startTime),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"endTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= POSIX
endTime),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"period" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
period),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"unit" Text -> MetricUnit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MetricUnit
unit),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"statistics" Text -> [MetricStatistic] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [MetricStatistic]
statistics)
]
)
instance Core.ToPath GetDistributionMetricData where
toPath :: GetDistributionMetricData -> ByteString
toPath = ByteString -> GetDistributionMetricData -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetDistributionMetricData where
toQuery :: GetDistributionMetricData -> QueryString
toQuery = QueryString -> GetDistributionMetricData -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetDistributionMetricDataResponse = GetDistributionMetricDataResponse'
{
GetDistributionMetricDataResponse -> Maybe DistributionMetricName
metricName :: Prelude.Maybe DistributionMetricName,
GetDistributionMetricDataResponse -> Maybe [MetricDatapoint]
metricData :: Prelude.Maybe [MetricDatapoint],
GetDistributionMetricDataResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetDistributionMetricDataResponse
-> GetDistributionMetricDataResponse -> Bool
(GetDistributionMetricDataResponse
-> GetDistributionMetricDataResponse -> Bool)
-> (GetDistributionMetricDataResponse
-> GetDistributionMetricDataResponse -> Bool)
-> Eq GetDistributionMetricDataResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDistributionMetricDataResponse
-> GetDistributionMetricDataResponse -> Bool
$c/= :: GetDistributionMetricDataResponse
-> GetDistributionMetricDataResponse -> Bool
== :: GetDistributionMetricDataResponse
-> GetDistributionMetricDataResponse -> Bool
$c== :: GetDistributionMetricDataResponse
-> GetDistributionMetricDataResponse -> Bool
Prelude.Eq, ReadPrec [GetDistributionMetricDataResponse]
ReadPrec GetDistributionMetricDataResponse
Int -> ReadS GetDistributionMetricDataResponse
ReadS [GetDistributionMetricDataResponse]
(Int -> ReadS GetDistributionMetricDataResponse)
-> ReadS [GetDistributionMetricDataResponse]
-> ReadPrec GetDistributionMetricDataResponse
-> ReadPrec [GetDistributionMetricDataResponse]
-> Read GetDistributionMetricDataResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDistributionMetricDataResponse]
$creadListPrec :: ReadPrec [GetDistributionMetricDataResponse]
readPrec :: ReadPrec GetDistributionMetricDataResponse
$creadPrec :: ReadPrec GetDistributionMetricDataResponse
readList :: ReadS [GetDistributionMetricDataResponse]
$creadList :: ReadS [GetDistributionMetricDataResponse]
readsPrec :: Int -> ReadS GetDistributionMetricDataResponse
$creadsPrec :: Int -> ReadS GetDistributionMetricDataResponse
Prelude.Read, Int -> GetDistributionMetricDataResponse -> ShowS
[GetDistributionMetricDataResponse] -> ShowS
GetDistributionMetricDataResponse -> String
(Int -> GetDistributionMetricDataResponse -> ShowS)
-> (GetDistributionMetricDataResponse -> String)
-> ([GetDistributionMetricDataResponse] -> ShowS)
-> Show GetDistributionMetricDataResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDistributionMetricDataResponse] -> ShowS
$cshowList :: [GetDistributionMetricDataResponse] -> ShowS
show :: GetDistributionMetricDataResponse -> String
$cshow :: GetDistributionMetricDataResponse -> String
showsPrec :: Int -> GetDistributionMetricDataResponse -> ShowS
$cshowsPrec :: Int -> GetDistributionMetricDataResponse -> ShowS
Prelude.Show, (forall x.
GetDistributionMetricDataResponse
-> Rep GetDistributionMetricDataResponse x)
-> (forall x.
Rep GetDistributionMetricDataResponse x
-> GetDistributionMetricDataResponse)
-> Generic GetDistributionMetricDataResponse
forall x.
Rep GetDistributionMetricDataResponse x
-> GetDistributionMetricDataResponse
forall x.
GetDistributionMetricDataResponse
-> Rep GetDistributionMetricDataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDistributionMetricDataResponse x
-> GetDistributionMetricDataResponse
$cfrom :: forall x.
GetDistributionMetricDataResponse
-> Rep GetDistributionMetricDataResponse x
Prelude.Generic)
newGetDistributionMetricDataResponse ::
Prelude.Int ->
GetDistributionMetricDataResponse
newGetDistributionMetricDataResponse :: Int -> GetDistributionMetricDataResponse
newGetDistributionMetricDataResponse Int
pHttpStatus_ =
GetDistributionMetricDataResponse' :: Maybe DistributionMetricName
-> Maybe [MetricDatapoint]
-> Int
-> GetDistributionMetricDataResponse
GetDistributionMetricDataResponse'
{ $sel:metricName:GetDistributionMetricDataResponse' :: Maybe DistributionMetricName
metricName =
Maybe DistributionMetricName
forall a. Maybe a
Prelude.Nothing,
$sel:metricData:GetDistributionMetricDataResponse' :: Maybe [MetricDatapoint]
metricData = Maybe [MetricDatapoint]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetDistributionMetricDataResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getDistributionMetricDataResponse_metricName :: Lens.Lens' GetDistributionMetricDataResponse (Prelude.Maybe DistributionMetricName)
getDistributionMetricDataResponse_metricName :: (Maybe DistributionMetricName -> f (Maybe DistributionMetricName))
-> GetDistributionMetricDataResponse
-> f GetDistributionMetricDataResponse
getDistributionMetricDataResponse_metricName = (GetDistributionMetricDataResponse -> Maybe DistributionMetricName)
-> (GetDistributionMetricDataResponse
-> Maybe DistributionMetricName
-> GetDistributionMetricDataResponse)
-> Lens
GetDistributionMetricDataResponse
GetDistributionMetricDataResponse
(Maybe DistributionMetricName)
(Maybe DistributionMetricName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionMetricDataResponse' {Maybe DistributionMetricName
metricName :: Maybe DistributionMetricName
$sel:metricName:GetDistributionMetricDataResponse' :: GetDistributionMetricDataResponse -> Maybe DistributionMetricName
metricName} -> Maybe DistributionMetricName
metricName) (\s :: GetDistributionMetricDataResponse
s@GetDistributionMetricDataResponse' {} Maybe DistributionMetricName
a -> GetDistributionMetricDataResponse
s {$sel:metricName:GetDistributionMetricDataResponse' :: Maybe DistributionMetricName
metricName = Maybe DistributionMetricName
a} :: GetDistributionMetricDataResponse)
getDistributionMetricDataResponse_metricData :: Lens.Lens' GetDistributionMetricDataResponse (Prelude.Maybe [MetricDatapoint])
getDistributionMetricDataResponse_metricData :: (Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> GetDistributionMetricDataResponse
-> f GetDistributionMetricDataResponse
getDistributionMetricDataResponse_metricData = (GetDistributionMetricDataResponse -> Maybe [MetricDatapoint])
-> (GetDistributionMetricDataResponse
-> Maybe [MetricDatapoint] -> GetDistributionMetricDataResponse)
-> Lens
GetDistributionMetricDataResponse
GetDistributionMetricDataResponse
(Maybe [MetricDatapoint])
(Maybe [MetricDatapoint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionMetricDataResponse' {Maybe [MetricDatapoint]
metricData :: Maybe [MetricDatapoint]
$sel:metricData:GetDistributionMetricDataResponse' :: GetDistributionMetricDataResponse -> Maybe [MetricDatapoint]
metricData} -> Maybe [MetricDatapoint]
metricData) (\s :: GetDistributionMetricDataResponse
s@GetDistributionMetricDataResponse' {} Maybe [MetricDatapoint]
a -> GetDistributionMetricDataResponse
s {$sel:metricData:GetDistributionMetricDataResponse' :: Maybe [MetricDatapoint]
metricData = Maybe [MetricDatapoint]
a} :: GetDistributionMetricDataResponse) ((Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> GetDistributionMetricDataResponse
-> f GetDistributionMetricDataResponse)
-> ((Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> (Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> GetDistributionMetricDataResponse
-> f GetDistributionMetricDataResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[MetricDatapoint]
[MetricDatapoint]
[MetricDatapoint]
[MetricDatapoint]
-> Iso
(Maybe [MetricDatapoint])
(Maybe [MetricDatapoint])
(Maybe [MetricDatapoint])
(Maybe [MetricDatapoint])
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 AnIso
[MetricDatapoint]
[MetricDatapoint]
[MetricDatapoint]
[MetricDatapoint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getDistributionMetricDataResponse_httpStatus :: Lens.Lens' GetDistributionMetricDataResponse Prelude.Int
getDistributionMetricDataResponse_httpStatus :: (Int -> f Int)
-> GetDistributionMetricDataResponse
-> f GetDistributionMetricDataResponse
getDistributionMetricDataResponse_httpStatus = (GetDistributionMetricDataResponse -> Int)
-> (GetDistributionMetricDataResponse
-> Int -> GetDistributionMetricDataResponse)
-> Lens
GetDistributionMetricDataResponse
GetDistributionMetricDataResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionMetricDataResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDistributionMetricDataResponse' :: GetDistributionMetricDataResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDistributionMetricDataResponse
s@GetDistributionMetricDataResponse' {} Int
a -> GetDistributionMetricDataResponse
s {$sel:httpStatus:GetDistributionMetricDataResponse' :: Int
httpStatus = Int
a} :: GetDistributionMetricDataResponse)
instance
Prelude.NFData
GetDistributionMetricDataResponse