{-# 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.GetBucketMetricData
(
GetBucketMetricData (..),
newGetBucketMetricData,
getBucketMetricData_bucketName,
getBucketMetricData_metricName,
getBucketMetricData_startTime,
getBucketMetricData_endTime,
getBucketMetricData_period,
getBucketMetricData_statistics,
getBucketMetricData_unit,
GetBucketMetricDataResponse (..),
newGetBucketMetricDataResponse,
getBucketMetricDataResponse_metricName,
getBucketMetricDataResponse_metricData,
getBucketMetricDataResponse_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 GetBucketMetricData = GetBucketMetricData'
{
GetBucketMetricData -> Text
bucketName :: Prelude.Text,
GetBucketMetricData -> BucketMetricName
metricName :: BucketMetricName,
GetBucketMetricData -> POSIX
startTime :: Core.POSIX,
GetBucketMetricData -> POSIX
endTime :: Core.POSIX,
GetBucketMetricData -> Natural
period :: Prelude.Natural,
GetBucketMetricData -> [MetricStatistic]
statistics :: [MetricStatistic],
GetBucketMetricData -> MetricUnit
unit :: MetricUnit
}
deriving (GetBucketMetricData -> GetBucketMetricData -> Bool
(GetBucketMetricData -> GetBucketMetricData -> Bool)
-> (GetBucketMetricData -> GetBucketMetricData -> Bool)
-> Eq GetBucketMetricData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketMetricData -> GetBucketMetricData -> Bool
$c/= :: GetBucketMetricData -> GetBucketMetricData -> Bool
== :: GetBucketMetricData -> GetBucketMetricData -> Bool
$c== :: GetBucketMetricData -> GetBucketMetricData -> Bool
Prelude.Eq, ReadPrec [GetBucketMetricData]
ReadPrec GetBucketMetricData
Int -> ReadS GetBucketMetricData
ReadS [GetBucketMetricData]
(Int -> ReadS GetBucketMetricData)
-> ReadS [GetBucketMetricData]
-> ReadPrec GetBucketMetricData
-> ReadPrec [GetBucketMetricData]
-> Read GetBucketMetricData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBucketMetricData]
$creadListPrec :: ReadPrec [GetBucketMetricData]
readPrec :: ReadPrec GetBucketMetricData
$creadPrec :: ReadPrec GetBucketMetricData
readList :: ReadS [GetBucketMetricData]
$creadList :: ReadS [GetBucketMetricData]
readsPrec :: Int -> ReadS GetBucketMetricData
$creadsPrec :: Int -> ReadS GetBucketMetricData
Prelude.Read, Int -> GetBucketMetricData -> ShowS
[GetBucketMetricData] -> ShowS
GetBucketMetricData -> String
(Int -> GetBucketMetricData -> ShowS)
-> (GetBucketMetricData -> String)
-> ([GetBucketMetricData] -> ShowS)
-> Show GetBucketMetricData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketMetricData] -> ShowS
$cshowList :: [GetBucketMetricData] -> ShowS
show :: GetBucketMetricData -> String
$cshow :: GetBucketMetricData -> String
showsPrec :: Int -> GetBucketMetricData -> ShowS
$cshowsPrec :: Int -> GetBucketMetricData -> ShowS
Prelude.Show, (forall x. GetBucketMetricData -> Rep GetBucketMetricData x)
-> (forall x. Rep GetBucketMetricData x -> GetBucketMetricData)
-> Generic GetBucketMetricData
forall x. Rep GetBucketMetricData x -> GetBucketMetricData
forall x. GetBucketMetricData -> Rep GetBucketMetricData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetBucketMetricData x -> GetBucketMetricData
$cfrom :: forall x. GetBucketMetricData -> Rep GetBucketMetricData x
Prelude.Generic)
newGetBucketMetricData ::
Prelude.Text ->
BucketMetricName ->
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Natural ->
MetricUnit ->
GetBucketMetricData
newGetBucketMetricData :: Text
-> BucketMetricName
-> UTCTime
-> UTCTime
-> Natural
-> MetricUnit
-> GetBucketMetricData
newGetBucketMetricData
Text
pBucketName_
BucketMetricName
pMetricName_
UTCTime
pStartTime_
UTCTime
pEndTime_
Natural
pPeriod_
MetricUnit
pUnit_ =
GetBucketMetricData' :: Text
-> BucketMetricName
-> POSIX
-> POSIX
-> Natural
-> [MetricStatistic]
-> MetricUnit
-> GetBucketMetricData
GetBucketMetricData'
{ $sel:bucketName:GetBucketMetricData' :: Text
bucketName = Text
pBucketName_,
$sel:metricName:GetBucketMetricData' :: BucketMetricName
metricName = BucketMetricName
pMetricName_,
$sel:startTime:GetBucketMetricData' :: 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:GetBucketMetricData' :: 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:GetBucketMetricData' :: Natural
period = Natural
pPeriod_,
$sel:statistics:GetBucketMetricData' :: [MetricStatistic]
statistics = [MetricStatistic]
forall a. Monoid a => a
Prelude.mempty,
$sel:unit:GetBucketMetricData' :: MetricUnit
unit = MetricUnit
pUnit_
}
getBucketMetricData_bucketName :: Lens.Lens' GetBucketMetricData Prelude.Text
getBucketMetricData_bucketName :: (Text -> f Text) -> GetBucketMetricData -> f GetBucketMetricData
getBucketMetricData_bucketName = (GetBucketMetricData -> Text)
-> (GetBucketMetricData -> Text -> GetBucketMetricData)
-> Lens GetBucketMetricData GetBucketMetricData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricData' {Text
bucketName :: Text
$sel:bucketName:GetBucketMetricData' :: GetBucketMetricData -> Text
bucketName} -> Text
bucketName) (\s :: GetBucketMetricData
s@GetBucketMetricData' {} Text
a -> GetBucketMetricData
s {$sel:bucketName:GetBucketMetricData' :: Text
bucketName = Text
a} :: GetBucketMetricData)
getBucketMetricData_metricName :: Lens.Lens' GetBucketMetricData BucketMetricName
getBucketMetricData_metricName :: (BucketMetricName -> f BucketMetricName)
-> GetBucketMetricData -> f GetBucketMetricData
getBucketMetricData_metricName = (GetBucketMetricData -> BucketMetricName)
-> (GetBucketMetricData -> BucketMetricName -> GetBucketMetricData)
-> Lens
GetBucketMetricData
GetBucketMetricData
BucketMetricName
BucketMetricName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricData' {BucketMetricName
metricName :: BucketMetricName
$sel:metricName:GetBucketMetricData' :: GetBucketMetricData -> BucketMetricName
metricName} -> BucketMetricName
metricName) (\s :: GetBucketMetricData
s@GetBucketMetricData' {} BucketMetricName
a -> GetBucketMetricData
s {$sel:metricName:GetBucketMetricData' :: BucketMetricName
metricName = BucketMetricName
a} :: GetBucketMetricData)
getBucketMetricData_startTime :: Lens.Lens' GetBucketMetricData Prelude.UTCTime
getBucketMetricData_startTime :: (UTCTime -> f UTCTime)
-> GetBucketMetricData -> f GetBucketMetricData
getBucketMetricData_startTime = (GetBucketMetricData -> POSIX)
-> (GetBucketMetricData -> POSIX -> GetBucketMetricData)
-> Lens GetBucketMetricData GetBucketMetricData POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricData' {POSIX
startTime :: POSIX
$sel:startTime:GetBucketMetricData' :: GetBucketMetricData -> POSIX
startTime} -> POSIX
startTime) (\s :: GetBucketMetricData
s@GetBucketMetricData' {} POSIX
a -> GetBucketMetricData
s {$sel:startTime:GetBucketMetricData' :: POSIX
startTime = POSIX
a} :: GetBucketMetricData) ((POSIX -> f POSIX)
-> GetBucketMetricData -> f GetBucketMetricData)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetBucketMetricData
-> f GetBucketMetricData
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
getBucketMetricData_endTime :: Lens.Lens' GetBucketMetricData Prelude.UTCTime
getBucketMetricData_endTime :: (UTCTime -> f UTCTime)
-> GetBucketMetricData -> f GetBucketMetricData
getBucketMetricData_endTime = (GetBucketMetricData -> POSIX)
-> (GetBucketMetricData -> POSIX -> GetBucketMetricData)
-> Lens GetBucketMetricData GetBucketMetricData POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricData' {POSIX
endTime :: POSIX
$sel:endTime:GetBucketMetricData' :: GetBucketMetricData -> POSIX
endTime} -> POSIX
endTime) (\s :: GetBucketMetricData
s@GetBucketMetricData' {} POSIX
a -> GetBucketMetricData
s {$sel:endTime:GetBucketMetricData' :: POSIX
endTime = POSIX
a} :: GetBucketMetricData) ((POSIX -> f POSIX)
-> GetBucketMetricData -> f GetBucketMetricData)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetBucketMetricData
-> f GetBucketMetricData
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
getBucketMetricData_period :: Lens.Lens' GetBucketMetricData Prelude.Natural
getBucketMetricData_period :: (Natural -> f Natural)
-> GetBucketMetricData -> f GetBucketMetricData
getBucketMetricData_period = (GetBucketMetricData -> Natural)
-> (GetBucketMetricData -> Natural -> GetBucketMetricData)
-> Lens GetBucketMetricData GetBucketMetricData Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricData' {Natural
period :: Natural
$sel:period:GetBucketMetricData' :: GetBucketMetricData -> Natural
period} -> Natural
period) (\s :: GetBucketMetricData
s@GetBucketMetricData' {} Natural
a -> GetBucketMetricData
s {$sel:period:GetBucketMetricData' :: Natural
period = Natural
a} :: GetBucketMetricData)
getBucketMetricData_statistics :: Lens.Lens' GetBucketMetricData [MetricStatistic]
getBucketMetricData_statistics :: ([MetricStatistic] -> f [MetricStatistic])
-> GetBucketMetricData -> f GetBucketMetricData
getBucketMetricData_statistics = (GetBucketMetricData -> [MetricStatistic])
-> (GetBucketMetricData
-> [MetricStatistic] -> GetBucketMetricData)
-> Lens
GetBucketMetricData
GetBucketMetricData
[MetricStatistic]
[MetricStatistic]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricData' {[MetricStatistic]
statistics :: [MetricStatistic]
$sel:statistics:GetBucketMetricData' :: GetBucketMetricData -> [MetricStatistic]
statistics} -> [MetricStatistic]
statistics) (\s :: GetBucketMetricData
s@GetBucketMetricData' {} [MetricStatistic]
a -> GetBucketMetricData
s {$sel:statistics:GetBucketMetricData' :: [MetricStatistic]
statistics = [MetricStatistic]
a} :: GetBucketMetricData) (([MetricStatistic] -> f [MetricStatistic])
-> GetBucketMetricData -> f GetBucketMetricData)
-> (([MetricStatistic] -> f [MetricStatistic])
-> [MetricStatistic] -> f [MetricStatistic])
-> ([MetricStatistic] -> f [MetricStatistic])
-> GetBucketMetricData
-> f GetBucketMetricData
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
getBucketMetricData_unit :: Lens.Lens' GetBucketMetricData MetricUnit
getBucketMetricData_unit :: (MetricUnit -> f MetricUnit)
-> GetBucketMetricData -> f GetBucketMetricData
getBucketMetricData_unit = (GetBucketMetricData -> MetricUnit)
-> (GetBucketMetricData -> MetricUnit -> GetBucketMetricData)
-> Lens
GetBucketMetricData GetBucketMetricData MetricUnit MetricUnit
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricData' {MetricUnit
unit :: MetricUnit
$sel:unit:GetBucketMetricData' :: GetBucketMetricData -> MetricUnit
unit} -> MetricUnit
unit) (\s :: GetBucketMetricData
s@GetBucketMetricData' {} MetricUnit
a -> GetBucketMetricData
s {$sel:unit:GetBucketMetricData' :: MetricUnit
unit = MetricUnit
a} :: GetBucketMetricData)
instance Core.AWSRequest GetBucketMetricData where
type
AWSResponse GetBucketMetricData =
GetBucketMetricDataResponse
request :: GetBucketMetricData -> Request GetBucketMetricData
request = Service -> GetBucketMetricData -> Request GetBucketMetricData
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetBucketMetricData
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetBucketMetricData)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetBucketMetricData))
-> Logger
-> Service
-> Proxy GetBucketMetricData
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetBucketMetricData)))
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 BucketMetricName
-> Maybe [MetricDatapoint] -> Int -> GetBucketMetricDataResponse
GetBucketMetricDataResponse'
(Maybe BucketMetricName
-> Maybe [MetricDatapoint] -> Int -> GetBucketMetricDataResponse)
-> Either String (Maybe BucketMetricName)
-> Either
String
(Maybe [MetricDatapoint] -> Int -> GetBucketMetricDataResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe BucketMetricName)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"metricName")
Either
String
(Maybe [MetricDatapoint] -> Int -> GetBucketMetricDataResponse)
-> Either String (Maybe [MetricDatapoint])
-> Either String (Int -> GetBucketMetricDataResponse)
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 -> GetBucketMetricDataResponse)
-> Either String Int -> Either String GetBucketMetricDataResponse
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 GetBucketMetricData
instance Prelude.NFData GetBucketMetricData
instance Core.ToHeaders GetBucketMetricData where
toHeaders :: GetBucketMetricData -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetBucketMetricData -> 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.GetBucketMetricData" ::
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 GetBucketMetricData where
toJSON :: GetBucketMetricData -> Value
toJSON GetBucketMetricData' {Natural
[MetricStatistic]
Text
POSIX
BucketMetricName
MetricUnit
unit :: MetricUnit
statistics :: [MetricStatistic]
period :: Natural
endTime :: POSIX
startTime :: POSIX
metricName :: BucketMetricName
bucketName :: Text
$sel:unit:GetBucketMetricData' :: GetBucketMetricData -> MetricUnit
$sel:statistics:GetBucketMetricData' :: GetBucketMetricData -> [MetricStatistic]
$sel:period:GetBucketMetricData' :: GetBucketMetricData -> Natural
$sel:endTime:GetBucketMetricData' :: GetBucketMetricData -> POSIX
$sel:startTime:GetBucketMetricData' :: GetBucketMetricData -> POSIX
$sel:metricName:GetBucketMetricData' :: GetBucketMetricData -> BucketMetricName
$sel:bucketName:GetBucketMetricData' :: GetBucketMetricData -> 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
"bucketName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
bucketName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"metricName" Text -> BucketMetricName -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= BucketMetricName
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
"statistics" Text -> [MetricStatistic] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [MetricStatistic]
statistics),
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)
]
)
instance Core.ToPath GetBucketMetricData where
toPath :: GetBucketMetricData -> ByteString
toPath = ByteString -> GetBucketMetricData -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetBucketMetricData where
toQuery :: GetBucketMetricData -> QueryString
toQuery = QueryString -> GetBucketMetricData -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetBucketMetricDataResponse = GetBucketMetricDataResponse'
{
GetBucketMetricDataResponse -> Maybe BucketMetricName
metricName :: Prelude.Maybe BucketMetricName,
GetBucketMetricDataResponse -> Maybe [MetricDatapoint]
metricData :: Prelude.Maybe [MetricDatapoint],
GetBucketMetricDataResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetBucketMetricDataResponse -> GetBucketMetricDataResponse -> Bool
(GetBucketMetricDataResponse
-> GetBucketMetricDataResponse -> Bool)
-> (GetBucketMetricDataResponse
-> GetBucketMetricDataResponse -> Bool)
-> Eq GetBucketMetricDataResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBucketMetricDataResponse -> GetBucketMetricDataResponse -> Bool
$c/= :: GetBucketMetricDataResponse -> GetBucketMetricDataResponse -> Bool
== :: GetBucketMetricDataResponse -> GetBucketMetricDataResponse -> Bool
$c== :: GetBucketMetricDataResponse -> GetBucketMetricDataResponse -> Bool
Prelude.Eq, ReadPrec [GetBucketMetricDataResponse]
ReadPrec GetBucketMetricDataResponse
Int -> ReadS GetBucketMetricDataResponse
ReadS [GetBucketMetricDataResponse]
(Int -> ReadS GetBucketMetricDataResponse)
-> ReadS [GetBucketMetricDataResponse]
-> ReadPrec GetBucketMetricDataResponse
-> ReadPrec [GetBucketMetricDataResponse]
-> Read GetBucketMetricDataResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBucketMetricDataResponse]
$creadListPrec :: ReadPrec [GetBucketMetricDataResponse]
readPrec :: ReadPrec GetBucketMetricDataResponse
$creadPrec :: ReadPrec GetBucketMetricDataResponse
readList :: ReadS [GetBucketMetricDataResponse]
$creadList :: ReadS [GetBucketMetricDataResponse]
readsPrec :: Int -> ReadS GetBucketMetricDataResponse
$creadsPrec :: Int -> ReadS GetBucketMetricDataResponse
Prelude.Read, Int -> GetBucketMetricDataResponse -> ShowS
[GetBucketMetricDataResponse] -> ShowS
GetBucketMetricDataResponse -> String
(Int -> GetBucketMetricDataResponse -> ShowS)
-> (GetBucketMetricDataResponse -> String)
-> ([GetBucketMetricDataResponse] -> ShowS)
-> Show GetBucketMetricDataResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBucketMetricDataResponse] -> ShowS
$cshowList :: [GetBucketMetricDataResponse] -> ShowS
show :: GetBucketMetricDataResponse -> String
$cshow :: GetBucketMetricDataResponse -> String
showsPrec :: Int -> GetBucketMetricDataResponse -> ShowS
$cshowsPrec :: Int -> GetBucketMetricDataResponse -> ShowS
Prelude.Show, (forall x.
GetBucketMetricDataResponse -> Rep GetBucketMetricDataResponse x)
-> (forall x.
Rep GetBucketMetricDataResponse x -> GetBucketMetricDataResponse)
-> Generic GetBucketMetricDataResponse
forall x.
Rep GetBucketMetricDataResponse x -> GetBucketMetricDataResponse
forall x.
GetBucketMetricDataResponse -> Rep GetBucketMetricDataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBucketMetricDataResponse x -> GetBucketMetricDataResponse
$cfrom :: forall x.
GetBucketMetricDataResponse -> Rep GetBucketMetricDataResponse x
Prelude.Generic)
newGetBucketMetricDataResponse ::
Prelude.Int ->
GetBucketMetricDataResponse
newGetBucketMetricDataResponse :: Int -> GetBucketMetricDataResponse
newGetBucketMetricDataResponse Int
pHttpStatus_ =
GetBucketMetricDataResponse' :: Maybe BucketMetricName
-> Maybe [MetricDatapoint] -> Int -> GetBucketMetricDataResponse
GetBucketMetricDataResponse'
{ $sel:metricName:GetBucketMetricDataResponse' :: Maybe BucketMetricName
metricName =
Maybe BucketMetricName
forall a. Maybe a
Prelude.Nothing,
$sel:metricData:GetBucketMetricDataResponse' :: Maybe [MetricDatapoint]
metricData = Maybe [MetricDatapoint]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetBucketMetricDataResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getBucketMetricDataResponse_metricName :: Lens.Lens' GetBucketMetricDataResponse (Prelude.Maybe BucketMetricName)
getBucketMetricDataResponse_metricName :: (Maybe BucketMetricName -> f (Maybe BucketMetricName))
-> GetBucketMetricDataResponse -> f GetBucketMetricDataResponse
getBucketMetricDataResponse_metricName = (GetBucketMetricDataResponse -> Maybe BucketMetricName)
-> (GetBucketMetricDataResponse
-> Maybe BucketMetricName -> GetBucketMetricDataResponse)
-> Lens
GetBucketMetricDataResponse
GetBucketMetricDataResponse
(Maybe BucketMetricName)
(Maybe BucketMetricName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricDataResponse' {Maybe BucketMetricName
metricName :: Maybe BucketMetricName
$sel:metricName:GetBucketMetricDataResponse' :: GetBucketMetricDataResponse -> Maybe BucketMetricName
metricName} -> Maybe BucketMetricName
metricName) (\s :: GetBucketMetricDataResponse
s@GetBucketMetricDataResponse' {} Maybe BucketMetricName
a -> GetBucketMetricDataResponse
s {$sel:metricName:GetBucketMetricDataResponse' :: Maybe BucketMetricName
metricName = Maybe BucketMetricName
a} :: GetBucketMetricDataResponse)
getBucketMetricDataResponse_metricData :: Lens.Lens' GetBucketMetricDataResponse (Prelude.Maybe [MetricDatapoint])
getBucketMetricDataResponse_metricData :: (Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> GetBucketMetricDataResponse -> f GetBucketMetricDataResponse
getBucketMetricDataResponse_metricData = (GetBucketMetricDataResponse -> Maybe [MetricDatapoint])
-> (GetBucketMetricDataResponse
-> Maybe [MetricDatapoint] -> GetBucketMetricDataResponse)
-> Lens
GetBucketMetricDataResponse
GetBucketMetricDataResponse
(Maybe [MetricDatapoint])
(Maybe [MetricDatapoint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricDataResponse' {Maybe [MetricDatapoint]
metricData :: Maybe [MetricDatapoint]
$sel:metricData:GetBucketMetricDataResponse' :: GetBucketMetricDataResponse -> Maybe [MetricDatapoint]
metricData} -> Maybe [MetricDatapoint]
metricData) (\s :: GetBucketMetricDataResponse
s@GetBucketMetricDataResponse' {} Maybe [MetricDatapoint]
a -> GetBucketMetricDataResponse
s {$sel:metricData:GetBucketMetricDataResponse' :: Maybe [MetricDatapoint]
metricData = Maybe [MetricDatapoint]
a} :: GetBucketMetricDataResponse) ((Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> GetBucketMetricDataResponse -> f GetBucketMetricDataResponse)
-> ((Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> (Maybe [MetricDatapoint] -> f (Maybe [MetricDatapoint]))
-> GetBucketMetricDataResponse
-> f GetBucketMetricDataResponse
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
getBucketMetricDataResponse_httpStatus :: Lens.Lens' GetBucketMetricDataResponse Prelude.Int
getBucketMetricDataResponse_httpStatus :: (Int -> f Int)
-> GetBucketMetricDataResponse -> f GetBucketMetricDataResponse
getBucketMetricDataResponse_httpStatus = (GetBucketMetricDataResponse -> Int)
-> (GetBucketMetricDataResponse
-> Int -> GetBucketMetricDataResponse)
-> Lens
GetBucketMetricDataResponse GetBucketMetricDataResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBucketMetricDataResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetBucketMetricDataResponse' :: GetBucketMetricDataResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetBucketMetricDataResponse
s@GetBucketMetricDataResponse' {} Int
a -> GetBucketMetricDataResponse
s {$sel:httpStatus:GetBucketMetricDataResponse' :: Int
httpStatus = Int
a} :: GetBucketMetricDataResponse)
instance Prelude.NFData GetBucketMetricDataResponse