{-# 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.GetLoadBalancerMetricData
(
GetLoadBalancerMetricData (..),
newGetLoadBalancerMetricData,
getLoadBalancerMetricData_loadBalancerName,
getLoadBalancerMetricData_metricName,
getLoadBalancerMetricData_period,
getLoadBalancerMetricData_startTime,
getLoadBalancerMetricData_endTime,
getLoadBalancerMetricData_unit,
getLoadBalancerMetricData_statistics,
GetLoadBalancerMetricDataResponse (..),
newGetLoadBalancerMetricDataResponse,
getLoadBalancerMetricDataResponse_metricName,
getLoadBalancerMetricDataResponse_metricData,
getLoadBalancerMetricDataResponse_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 GetLoadBalancerMetricData = GetLoadBalancerMetricData'
{
GetLoadBalancerMetricData -> Text
loadBalancerName :: Prelude.Text,
GetLoadBalancerMetricData -> LoadBalancerMetricName
metricName :: LoadBalancerMetricName,
GetLoadBalancerMetricData -> Natural
period :: Prelude.Natural,
GetLoadBalancerMetricData -> POSIX
startTime :: Core.POSIX,
GetLoadBalancerMetricData -> POSIX
endTime :: Core.POSIX,
GetLoadBalancerMetricData -> MetricUnit
unit :: MetricUnit,
GetLoadBalancerMetricData -> [MetricStatistic]
statistics :: [MetricStatistic]
}
deriving (GetLoadBalancerMetricData -> GetLoadBalancerMetricData -> Bool
(GetLoadBalancerMetricData -> GetLoadBalancerMetricData -> Bool)
-> (GetLoadBalancerMetricData -> GetLoadBalancerMetricData -> Bool)
-> Eq GetLoadBalancerMetricData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLoadBalancerMetricData -> GetLoadBalancerMetricData -> Bool
$c/= :: GetLoadBalancerMetricData -> GetLoadBalancerMetricData -> Bool
== :: GetLoadBalancerMetricData -> GetLoadBalancerMetricData -> Bool
$c== :: GetLoadBalancerMetricData -> GetLoadBalancerMetricData -> Bool
Prelude.Eq, ReadPrec [GetLoadBalancerMetricData]
ReadPrec GetLoadBalancerMetricData
Int -> ReadS GetLoadBalancerMetricData
ReadS [GetLoadBalancerMetricData]
(Int -> ReadS GetLoadBalancerMetricData)
-> ReadS [GetLoadBalancerMetricData]
-> ReadPrec GetLoadBalancerMetricData
-> ReadPrec [GetLoadBalancerMetricData]
-> Read GetLoadBalancerMetricData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLoadBalancerMetricData]
$creadListPrec :: ReadPrec [GetLoadBalancerMetricData]
readPrec :: ReadPrec GetLoadBalancerMetricData
$creadPrec :: ReadPrec GetLoadBalancerMetricData
readList :: ReadS [GetLoadBalancerMetricData]
$creadList :: ReadS [GetLoadBalancerMetricData]
readsPrec :: Int -> ReadS GetLoadBalancerMetricData
$creadsPrec :: Int -> ReadS GetLoadBalancerMetricData
Prelude.Read, Int -> GetLoadBalancerMetricData -> ShowS
[GetLoadBalancerMetricData] -> ShowS
GetLoadBalancerMetricData -> String
(Int -> GetLoadBalancerMetricData -> ShowS)
-> (GetLoadBalancerMetricData -> String)
-> ([GetLoadBalancerMetricData] -> ShowS)
-> Show GetLoadBalancerMetricData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLoadBalancerMetricData] -> ShowS
$cshowList :: [GetLoadBalancerMetricData] -> ShowS
show :: GetLoadBalancerMetricData -> String
$cshow :: GetLoadBalancerMetricData -> String
showsPrec :: Int -> GetLoadBalancerMetricData -> ShowS
$cshowsPrec :: Int -> GetLoadBalancerMetricData -> ShowS
Prelude.Show, (forall x.
GetLoadBalancerMetricData -> Rep GetLoadBalancerMetricData x)
-> (forall x.
Rep GetLoadBalancerMetricData x -> GetLoadBalancerMetricData)
-> Generic GetLoadBalancerMetricData
forall x.
Rep GetLoadBalancerMetricData x -> GetLoadBalancerMetricData
forall x.
GetLoadBalancerMetricData -> Rep GetLoadBalancerMetricData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLoadBalancerMetricData x -> GetLoadBalancerMetricData
$cfrom :: forall x.
GetLoadBalancerMetricData -> Rep GetLoadBalancerMetricData x
Prelude.Generic)
newGetLoadBalancerMetricData ::
Prelude.Text ->
LoadBalancerMetricName ->
Prelude.Natural ->
Prelude.UTCTime ->
Prelude.UTCTime ->
MetricUnit ->
GetLoadBalancerMetricData
newGetLoadBalancerMetricData :: Text
-> LoadBalancerMetricName
-> Natural
-> UTCTime
-> UTCTime
-> MetricUnit
-> GetLoadBalancerMetricData
newGetLoadBalancerMetricData
Text
pLoadBalancerName_
LoadBalancerMetricName
pMetricName_
Natural
pPeriod_
UTCTime
pStartTime_
UTCTime
pEndTime_
MetricUnit
pUnit_ =
GetLoadBalancerMetricData' :: Text
-> LoadBalancerMetricName
-> Natural
-> POSIX
-> POSIX
-> MetricUnit
-> [MetricStatistic]
-> GetLoadBalancerMetricData
GetLoadBalancerMetricData'
{ $sel:loadBalancerName:GetLoadBalancerMetricData' :: Text
loadBalancerName =
Text
pLoadBalancerName_,
$sel:metricName:GetLoadBalancerMetricData' :: LoadBalancerMetricName
metricName = LoadBalancerMetricName
pMetricName_,
$sel:period:GetLoadBalancerMetricData' :: Natural
period = Natural
pPeriod_,
$sel:startTime:GetLoadBalancerMetricData' :: 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:GetLoadBalancerMetricData' :: 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:unit:GetLoadBalancerMetricData' :: MetricUnit
unit = MetricUnit
pUnit_,
$sel:statistics:GetLoadBalancerMetricData' :: [MetricStatistic]
statistics = [MetricStatistic]
forall a. Monoid a => a
Prelude.mempty
}
getLoadBalancerMetricData_loadBalancerName :: Lens.Lens' GetLoadBalancerMetricData Prelude.Text
getLoadBalancerMetricData_loadBalancerName :: (Text -> f Text)
-> GetLoadBalancerMetricData -> f GetLoadBalancerMetricData
getLoadBalancerMetricData_loadBalancerName = (GetLoadBalancerMetricData -> Text)
-> (GetLoadBalancerMetricData -> Text -> GetLoadBalancerMetricData)
-> Lens
GetLoadBalancerMetricData GetLoadBalancerMetricData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerMetricData' {Text
loadBalancerName :: Text
$sel:loadBalancerName:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> Text
loadBalancerName} -> Text
loadBalancerName) (\s :: GetLoadBalancerMetricData
s@GetLoadBalancerMetricData' {} Text
a -> GetLoadBalancerMetricData
s {$sel:loadBalancerName:GetLoadBalancerMetricData' :: Text
loadBalancerName = Text
a} :: GetLoadBalancerMetricData)
getLoadBalancerMetricData_metricName :: Lens.Lens' GetLoadBalancerMetricData LoadBalancerMetricName
getLoadBalancerMetricData_metricName :: (LoadBalancerMetricName -> f LoadBalancerMetricName)
-> GetLoadBalancerMetricData -> f GetLoadBalancerMetricData
getLoadBalancerMetricData_metricName = (GetLoadBalancerMetricData -> LoadBalancerMetricName)
-> (GetLoadBalancerMetricData
-> LoadBalancerMetricName -> GetLoadBalancerMetricData)
-> Lens
GetLoadBalancerMetricData
GetLoadBalancerMetricData
LoadBalancerMetricName
LoadBalancerMetricName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerMetricData' {LoadBalancerMetricName
metricName :: LoadBalancerMetricName
$sel:metricName:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> LoadBalancerMetricName
metricName} -> LoadBalancerMetricName
metricName) (\s :: GetLoadBalancerMetricData
s@GetLoadBalancerMetricData' {} LoadBalancerMetricName
a -> GetLoadBalancerMetricData
s {$sel:metricName:GetLoadBalancerMetricData' :: LoadBalancerMetricName
metricName = LoadBalancerMetricName
a} :: GetLoadBalancerMetricData)
getLoadBalancerMetricData_period :: Lens.Lens' GetLoadBalancerMetricData Prelude.Natural
getLoadBalancerMetricData_period :: (Natural -> f Natural)
-> GetLoadBalancerMetricData -> f GetLoadBalancerMetricData
getLoadBalancerMetricData_period = (GetLoadBalancerMetricData -> Natural)
-> (GetLoadBalancerMetricData
-> Natural -> GetLoadBalancerMetricData)
-> Lens
GetLoadBalancerMetricData GetLoadBalancerMetricData Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerMetricData' {Natural
period :: Natural
$sel:period:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> Natural
period} -> Natural
period) (\s :: GetLoadBalancerMetricData
s@GetLoadBalancerMetricData' {} Natural
a -> GetLoadBalancerMetricData
s {$sel:period:GetLoadBalancerMetricData' :: Natural
period = Natural
a} :: GetLoadBalancerMetricData)
getLoadBalancerMetricData_startTime :: Lens.Lens' GetLoadBalancerMetricData Prelude.UTCTime
getLoadBalancerMetricData_startTime :: (UTCTime -> f UTCTime)
-> GetLoadBalancerMetricData -> f GetLoadBalancerMetricData
getLoadBalancerMetricData_startTime = (GetLoadBalancerMetricData -> POSIX)
-> (GetLoadBalancerMetricData
-> POSIX -> GetLoadBalancerMetricData)
-> Lens
GetLoadBalancerMetricData GetLoadBalancerMetricData POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerMetricData' {POSIX
startTime :: POSIX
$sel:startTime:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> POSIX
startTime} -> POSIX
startTime) (\s :: GetLoadBalancerMetricData
s@GetLoadBalancerMetricData' {} POSIX
a -> GetLoadBalancerMetricData
s {$sel:startTime:GetLoadBalancerMetricData' :: POSIX
startTime = POSIX
a} :: GetLoadBalancerMetricData) ((POSIX -> f POSIX)
-> GetLoadBalancerMetricData -> f GetLoadBalancerMetricData)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetLoadBalancerMetricData
-> f GetLoadBalancerMetricData
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
getLoadBalancerMetricData_endTime :: Lens.Lens' GetLoadBalancerMetricData Prelude.UTCTime
getLoadBalancerMetricData_endTime :: (UTCTime -> f UTCTime)
-> GetLoadBalancerMetricData -> f GetLoadBalancerMetricData
getLoadBalancerMetricData_endTime = (GetLoadBalancerMetricData -> POSIX)
-> (GetLoadBalancerMetricData
-> POSIX -> GetLoadBalancerMetricData)
-> Lens
GetLoadBalancerMetricData GetLoadBalancerMetricData POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerMetricData' {POSIX
endTime :: POSIX
$sel:endTime:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> POSIX
endTime} -> POSIX
endTime) (\s :: GetLoadBalancerMetricData
s@GetLoadBalancerMetricData' {} POSIX
a -> GetLoadBalancerMetricData
s {$sel:endTime:GetLoadBalancerMetricData' :: POSIX
endTime = POSIX
a} :: GetLoadBalancerMetricData) ((POSIX -> f POSIX)
-> GetLoadBalancerMetricData -> f GetLoadBalancerMetricData)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetLoadBalancerMetricData
-> f GetLoadBalancerMetricData
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
getLoadBalancerMetricData_unit :: Lens.Lens' GetLoadBalancerMetricData MetricUnit
getLoadBalancerMetricData_unit :: (MetricUnit -> f MetricUnit)
-> GetLoadBalancerMetricData -> f GetLoadBalancerMetricData
getLoadBalancerMetricData_unit = (GetLoadBalancerMetricData -> MetricUnit)
-> (GetLoadBalancerMetricData
-> MetricUnit -> GetLoadBalancerMetricData)
-> Lens
GetLoadBalancerMetricData
GetLoadBalancerMetricData
MetricUnit
MetricUnit
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerMetricData' {MetricUnit
unit :: MetricUnit
$sel:unit:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> MetricUnit
unit} -> MetricUnit
unit) (\s :: GetLoadBalancerMetricData
s@GetLoadBalancerMetricData' {} MetricUnit
a -> GetLoadBalancerMetricData
s {$sel:unit:GetLoadBalancerMetricData' :: MetricUnit
unit = MetricUnit
a} :: GetLoadBalancerMetricData)
getLoadBalancerMetricData_statistics :: Lens.Lens' GetLoadBalancerMetricData [MetricStatistic]
getLoadBalancerMetricData_statistics :: ([MetricStatistic] -> f [MetricStatistic])
-> GetLoadBalancerMetricData -> f GetLoadBalancerMetricData
getLoadBalancerMetricData_statistics = (GetLoadBalancerMetricData -> [MetricStatistic])
-> (GetLoadBalancerMetricData
-> [MetricStatistic] -> GetLoadBalancerMetricData)
-> Lens
GetLoadBalancerMetricData
GetLoadBalancerMetricData
[MetricStatistic]
[MetricStatistic]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerMetricData' {[MetricStatistic]
statistics :: [MetricStatistic]
$sel:statistics:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> [MetricStatistic]
statistics} -> [MetricStatistic]
statistics) (\s :: GetLoadBalancerMetricData
s@GetLoadBalancerMetricData' {} [MetricStatistic]
a -> GetLoadBalancerMetricData
s {$sel:statistics:GetLoadBalancerMetricData' :: [MetricStatistic]
statistics = [MetricStatistic]
a} :: GetLoadBalancerMetricData) (([MetricStatistic] -> f [MetricStatistic])
-> GetLoadBalancerMetricData -> f GetLoadBalancerMetricData)
-> (([MetricStatistic] -> f [MetricStatistic])
-> [MetricStatistic] -> f [MetricStatistic])
-> ([MetricStatistic] -> f [MetricStatistic])
-> GetLoadBalancerMetricData
-> f GetLoadBalancerMetricData
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 GetLoadBalancerMetricData where
type
AWSResponse GetLoadBalancerMetricData =
GetLoadBalancerMetricDataResponse
request :: GetLoadBalancerMetricData -> Request GetLoadBalancerMetricData
request = Service
-> GetLoadBalancerMetricData -> Request GetLoadBalancerMetricData
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetLoadBalancerMetricData
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetLoadBalancerMetricData)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetLoadBalancerMetricData))
-> Logger
-> Service
-> Proxy GetLoadBalancerMetricData
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetLoadBalancerMetricData)))
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 LoadBalancerMetricName
-> Maybe [MetricDatapoint]
-> Int
-> GetLoadBalancerMetricDataResponse
GetLoadBalancerMetricDataResponse'
(Maybe LoadBalancerMetricName
-> Maybe [MetricDatapoint]
-> Int
-> GetLoadBalancerMetricDataResponse)
-> Either String (Maybe LoadBalancerMetricName)
-> Either
String
(Maybe [MetricDatapoint]
-> Int -> GetLoadBalancerMetricDataResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe LoadBalancerMetricName)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"metricName")
Either
String
(Maybe [MetricDatapoint]
-> Int -> GetLoadBalancerMetricDataResponse)
-> Either String (Maybe [MetricDatapoint])
-> Either String (Int -> GetLoadBalancerMetricDataResponse)
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 -> GetLoadBalancerMetricDataResponse)
-> Either String Int
-> Either String GetLoadBalancerMetricDataResponse
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 GetLoadBalancerMetricData
instance Prelude.NFData GetLoadBalancerMetricData
instance Core.ToHeaders GetLoadBalancerMetricData where
toHeaders :: GetLoadBalancerMetricData -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetLoadBalancerMetricData -> 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.GetLoadBalancerMetricData" ::
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 GetLoadBalancerMetricData where
toJSON :: GetLoadBalancerMetricData -> Value
toJSON GetLoadBalancerMetricData' {Natural
[MetricStatistic]
Text
POSIX
LoadBalancerMetricName
MetricUnit
statistics :: [MetricStatistic]
unit :: MetricUnit
endTime :: POSIX
startTime :: POSIX
period :: Natural
metricName :: LoadBalancerMetricName
loadBalancerName :: Text
$sel:statistics:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> [MetricStatistic]
$sel:unit:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> MetricUnit
$sel:endTime:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> POSIX
$sel:startTime:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> POSIX
$sel:period:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> Natural
$sel:metricName:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> LoadBalancerMetricName
$sel:loadBalancerName:GetLoadBalancerMetricData' :: GetLoadBalancerMetricData -> 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
"loadBalancerName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
loadBalancerName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"metricName" Text -> LoadBalancerMetricName -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LoadBalancerMetricName
metricName),
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
"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
"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 GetLoadBalancerMetricData where
toPath :: GetLoadBalancerMetricData -> ByteString
toPath = ByteString -> GetLoadBalancerMetricData -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetLoadBalancerMetricData where
toQuery :: GetLoadBalancerMetricData -> QueryString
toQuery = QueryString -> GetLoadBalancerMetricData -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetLoadBalancerMetricDataResponse = GetLoadBalancerMetricDataResponse'
{
GetLoadBalancerMetricDataResponse -> Maybe LoadBalancerMetricName
metricName :: Prelude.Maybe LoadBalancerMetricName,
GetLoadBalancerMetricDataResponse -> Maybe [MetricDatapoint]
metricData :: Prelude.Maybe [MetricDatapoint],
GetLoadBalancerMetricDataResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetLoadBalancerMetricDataResponse
-> GetLoadBalancerMetricDataResponse -> Bool
(GetLoadBalancerMetricDataResponse
-> GetLoadBalancerMetricDataResponse -> Bool)
-> (GetLoadBalancerMetricDataResponse
-> GetLoadBalancerMetricDataResponse -> Bool)
-> Eq GetLoadBalancerMetricDataResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLoadBalancerMetricDataResponse
-> GetLoadBalancerMetricDataResponse -> Bool
$c/= :: GetLoadBalancerMetricDataResponse
-> GetLoadBalancerMetricDataResponse -> Bool
== :: GetLoadBalancerMetricDataResponse
-> GetLoadBalancerMetricDataResponse -> Bool
$c== :: GetLoadBalancerMetricDataResponse
-> GetLoadBalancerMetricDataResponse -> Bool
Prelude.Eq, ReadPrec [GetLoadBalancerMetricDataResponse]
ReadPrec GetLoadBalancerMetricDataResponse
Int -> ReadS GetLoadBalancerMetricDataResponse
ReadS [GetLoadBalancerMetricDataResponse]
(Int -> ReadS GetLoadBalancerMetricDataResponse)
-> ReadS [GetLoadBalancerMetricDataResponse]
-> ReadPrec GetLoadBalancerMetricDataResponse
-> ReadPrec [GetLoadBalancerMetricDataResponse]
-> Read GetLoadBalancerMetricDataResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLoadBalancerMetricDataResponse]
$creadListPrec :: ReadPrec [GetLoadBalancerMetricDataResponse]
readPrec :: ReadPrec GetLoadBalancerMetricDataResponse
$creadPrec :: ReadPrec GetLoadBalancerMetricDataResponse
readList :: ReadS [GetLoadBalancerMetricDataResponse]
$creadList :: ReadS [GetLoadBalancerMetricDataResponse]
readsPrec :: Int -> ReadS GetLoadBalancerMetricDataResponse
$creadsPrec :: Int -> ReadS GetLoadBalancerMetricDataResponse
Prelude.Read, Int -> GetLoadBalancerMetricDataResponse -> ShowS
[GetLoadBalancerMetricDataResponse] -> ShowS
GetLoadBalancerMetricDataResponse -> String
(Int -> GetLoadBalancerMetricDataResponse -> ShowS)
-> (GetLoadBalancerMetricDataResponse -> String)
-> ([GetLoadBalancerMetricDataResponse] -> ShowS)
-> Show GetLoadBalancerMetricDataResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLoadBalancerMetricDataResponse] -> ShowS
$cshowList :: [GetLoadBalancerMetricDataResponse] -> ShowS
show :: GetLoadBalancerMetricDataResponse -> String
$cshow :: GetLoadBalancerMetricDataResponse -> String
showsPrec :: Int -> GetLoadBalancerMetricDataResponse -> ShowS
$cshowsPrec :: Int -> GetLoadBalancerMetricDataResponse -> ShowS
Prelude.Show, (forall x.
GetLoadBalancerMetricDataResponse
-> Rep GetLoadBalancerMetricDataResponse x)
-> (forall x.
Rep GetLoadBalancerMetricDataResponse x
-> GetLoadBalancerMetricDataResponse)
-> Generic GetLoadBalancerMetricDataResponse
forall x.
Rep GetLoadBalancerMetricDataResponse x
-> GetLoadBalancerMetricDataResponse
forall x.
GetLoadBalancerMetricDataResponse
-> Rep GetLoadBalancerMetricDataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLoadBalancerMetricDataResponse x
-> GetLoadBalancerMetricDataResponse
$cfrom :: forall x.
GetLoadBalancerMetricDataResponse
-> Rep GetLoadBalancerMetricDataResponse x
Prelude.Generic)
newGetLoadBalancerMetricDataResponse ::
Prelude.Int ->
GetLoadBalancerMetricDataResponse
newGetLoadBalancerMetricDataResponse :: Int -> GetLoadBalancerMetricDataResponse
newGetLoadBalancerMetricDataResponse Int
pHttpStatus_ =
GetLoadBalancerMetricDataResponse' :: Maybe LoadBalancerMetricName
-> Maybe [MetricDatapoint]
-> Int
-> GetLoadBalancerMetricDataResponse
GetLoadBalancerMetricDataResponse'
{ $sel:metricName:GetLoadBalancerMetricDataResponse' :: Maybe LoadBalancerMetricName
metricName =
Maybe LoadBalancerMetricName
forall a. Maybe a
Prelude.Nothing,
$sel:metricData:GetLoadBalancerMetricDataResponse' :: Maybe [MetricDatapoint]
metricData = Maybe [MetricDatapoint]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetLoadBalancerMetricDataResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getLoadBalancerMetricDataResponse_metricName :: Lens.Lens' GetLoadBalancerMetricDataResponse (Prelude.Maybe LoadBalancerMetricName)
getLoadBalancerMetricDataResponse_metricName :: (Maybe LoadBalancerMetricName -> f (Maybe LoadBalancerMetricName))
-> GetLoadBalancerMetricDataResponse
-> f GetLoadBalancerMetricDataResponse
getLoadBalancerMetricDataResponse_metricName = (GetLoadBalancerMetricDataResponse -> Maybe LoadBalancerMetricName)
-> (GetLoadBalancerMetricDataResponse
-> Maybe LoadBalancerMetricName
-> GetLoadBalancerMetricDataResponse)
-> Lens
GetLoadBalancerMetricDataResponse
GetLoadBalancerMetricDataResponse
(Maybe LoadBalancerMetricName)
(Maybe LoadBalancerMetricName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerMetricDataResponse' {Maybe LoadBalancerMetricName
metricName :: Maybe LoadBalancerMetricName
$sel:metricName:GetLoadBalancerMetricDataResponse' :: GetLoadBalancerMetricDataResponse -> Maybe LoadBalancerMetricName
metricName} -> Maybe LoadBalancerMetricName
metricName) (\s :: GetLoadBalancerMetricDataResponse
s@GetLoadBalancerMetricDataResponse' {} Maybe LoadBalancerMetricName
a -> GetLoadBalancerMetricDataResponse
s {$sel:metricName:GetLoadBalancerMetricDataResponse' :: Maybe LoadBalancerMetricName
metricName = Maybe LoadBalancerMetricName
a} :: GetLoadBalancerMetricDataResponse)
getLoadBalancerMetricDataResponse_metricData :: Lens.Lens' GetLoadBalancerMetricDataResponse (Prelude.Maybe [MetricDatapoint])
getLoadBalancerMetricDataResponse_metricData :: (Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> GetLoadBalancerMetricDataResponse
-> f GetLoadBalancerMetricDataResponse
getLoadBalancerMetricDataResponse_metricData = (GetLoadBalancerMetricDataResponse -> Maybe [MetricDatapoint])
-> (GetLoadBalancerMetricDataResponse
-> Maybe [MetricDatapoint] -> GetLoadBalancerMetricDataResponse)
-> Lens
GetLoadBalancerMetricDataResponse
GetLoadBalancerMetricDataResponse
(Maybe [MetricDatapoint])
(Maybe [MetricDatapoint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerMetricDataResponse' {Maybe [MetricDatapoint]
metricData :: Maybe [MetricDatapoint]
$sel:metricData:GetLoadBalancerMetricDataResponse' :: GetLoadBalancerMetricDataResponse -> Maybe [MetricDatapoint]
metricData} -> Maybe [MetricDatapoint]
metricData) (\s :: GetLoadBalancerMetricDataResponse
s@GetLoadBalancerMetricDataResponse' {} Maybe [MetricDatapoint]
a -> GetLoadBalancerMetricDataResponse
s {$sel:metricData:GetLoadBalancerMetricDataResponse' :: Maybe [MetricDatapoint]
metricData = Maybe [MetricDatapoint]
a} :: GetLoadBalancerMetricDataResponse) ((Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> GetLoadBalancerMetricDataResponse
-> f GetLoadBalancerMetricDataResponse)
-> ((Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> (Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> GetLoadBalancerMetricDataResponse
-> f GetLoadBalancerMetricDataResponse
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
getLoadBalancerMetricDataResponse_httpStatus :: Lens.Lens' GetLoadBalancerMetricDataResponse Prelude.Int
getLoadBalancerMetricDataResponse_httpStatus :: (Int -> f Int)
-> GetLoadBalancerMetricDataResponse
-> f GetLoadBalancerMetricDataResponse
getLoadBalancerMetricDataResponse_httpStatus = (GetLoadBalancerMetricDataResponse -> Int)
-> (GetLoadBalancerMetricDataResponse
-> Int -> GetLoadBalancerMetricDataResponse)
-> Lens
GetLoadBalancerMetricDataResponse
GetLoadBalancerMetricDataResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerMetricDataResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetLoadBalancerMetricDataResponse' :: GetLoadBalancerMetricDataResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetLoadBalancerMetricDataResponse
s@GetLoadBalancerMetricDataResponse' {} Int
a -> GetLoadBalancerMetricDataResponse
s {$sel:httpStatus:GetLoadBalancerMetricDataResponse' :: Int
httpStatus = Int
a} :: GetLoadBalancerMetricDataResponse)
instance
Prelude.NFData
GetLoadBalancerMetricDataResponse