{-# 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.Connect.GetCurrentMetricData
(
GetCurrentMetricData (..),
newGetCurrentMetricData,
getCurrentMetricData_nextToken,
getCurrentMetricData_groupings,
getCurrentMetricData_maxResults,
getCurrentMetricData_instanceId,
getCurrentMetricData_filters,
getCurrentMetricData_currentMetrics,
GetCurrentMetricDataResponse (..),
newGetCurrentMetricDataResponse,
getCurrentMetricDataResponse_metricResults,
getCurrentMetricDataResponse_dataSnapshotTime,
getCurrentMetricDataResponse_nextToken,
getCurrentMetricDataResponse_httpStatus,
)
where
import Amazonka.Connect.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetCurrentMetricData = GetCurrentMetricData'
{
GetCurrentMetricData -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetCurrentMetricData -> Maybe [Grouping]
groupings :: Prelude.Maybe [Grouping],
GetCurrentMetricData -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetCurrentMetricData -> Text
instanceId :: Prelude.Text,
GetCurrentMetricData -> Filters
filters :: Filters,
GetCurrentMetricData -> [CurrentMetric]
currentMetrics :: [CurrentMetric]
}
deriving (GetCurrentMetricData -> GetCurrentMetricData -> Bool
(GetCurrentMetricData -> GetCurrentMetricData -> Bool)
-> (GetCurrentMetricData -> GetCurrentMetricData -> Bool)
-> Eq GetCurrentMetricData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCurrentMetricData -> GetCurrentMetricData -> Bool
$c/= :: GetCurrentMetricData -> GetCurrentMetricData -> Bool
== :: GetCurrentMetricData -> GetCurrentMetricData -> Bool
$c== :: GetCurrentMetricData -> GetCurrentMetricData -> Bool
Prelude.Eq, ReadPrec [GetCurrentMetricData]
ReadPrec GetCurrentMetricData
Int -> ReadS GetCurrentMetricData
ReadS [GetCurrentMetricData]
(Int -> ReadS GetCurrentMetricData)
-> ReadS [GetCurrentMetricData]
-> ReadPrec GetCurrentMetricData
-> ReadPrec [GetCurrentMetricData]
-> Read GetCurrentMetricData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCurrentMetricData]
$creadListPrec :: ReadPrec [GetCurrentMetricData]
readPrec :: ReadPrec GetCurrentMetricData
$creadPrec :: ReadPrec GetCurrentMetricData
readList :: ReadS [GetCurrentMetricData]
$creadList :: ReadS [GetCurrentMetricData]
readsPrec :: Int -> ReadS GetCurrentMetricData
$creadsPrec :: Int -> ReadS GetCurrentMetricData
Prelude.Read, Int -> GetCurrentMetricData -> ShowS
[GetCurrentMetricData] -> ShowS
GetCurrentMetricData -> String
(Int -> GetCurrentMetricData -> ShowS)
-> (GetCurrentMetricData -> String)
-> ([GetCurrentMetricData] -> ShowS)
-> Show GetCurrentMetricData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCurrentMetricData] -> ShowS
$cshowList :: [GetCurrentMetricData] -> ShowS
show :: GetCurrentMetricData -> String
$cshow :: GetCurrentMetricData -> String
showsPrec :: Int -> GetCurrentMetricData -> ShowS
$cshowsPrec :: Int -> GetCurrentMetricData -> ShowS
Prelude.Show, (forall x. GetCurrentMetricData -> Rep GetCurrentMetricData x)
-> (forall x. Rep GetCurrentMetricData x -> GetCurrentMetricData)
-> Generic GetCurrentMetricData
forall x. Rep GetCurrentMetricData x -> GetCurrentMetricData
forall x. GetCurrentMetricData -> Rep GetCurrentMetricData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetCurrentMetricData x -> GetCurrentMetricData
$cfrom :: forall x. GetCurrentMetricData -> Rep GetCurrentMetricData x
Prelude.Generic)
newGetCurrentMetricData ::
Prelude.Text ->
Filters ->
GetCurrentMetricData
newGetCurrentMetricData :: Text -> Filters -> GetCurrentMetricData
newGetCurrentMetricData Text
pInstanceId_ Filters
pFilters_ =
GetCurrentMetricData' :: Maybe Text
-> Maybe [Grouping]
-> Maybe Natural
-> Text
-> Filters
-> [CurrentMetric]
-> GetCurrentMetricData
GetCurrentMetricData'
{ $sel:nextToken:GetCurrentMetricData' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:groupings:GetCurrentMetricData' :: Maybe [Grouping]
groupings = Maybe [Grouping]
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetCurrentMetricData' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:instanceId:GetCurrentMetricData' :: Text
instanceId = Text
pInstanceId_,
$sel:filters:GetCurrentMetricData' :: Filters
filters = Filters
pFilters_,
$sel:currentMetrics:GetCurrentMetricData' :: [CurrentMetric]
currentMetrics = [CurrentMetric]
forall a. Monoid a => a
Prelude.mempty
}
getCurrentMetricData_nextToken :: Lens.Lens' GetCurrentMetricData (Prelude.Maybe Prelude.Text)
getCurrentMetricData_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetCurrentMetricData -> f GetCurrentMetricData
getCurrentMetricData_nextToken = (GetCurrentMetricData -> Maybe Text)
-> (GetCurrentMetricData -> Maybe Text -> GetCurrentMetricData)
-> Lens
GetCurrentMetricData GetCurrentMetricData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCurrentMetricData' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetCurrentMetricData' :: GetCurrentMetricData -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetCurrentMetricData
s@GetCurrentMetricData' {} Maybe Text
a -> GetCurrentMetricData
s {$sel:nextToken:GetCurrentMetricData' :: Maybe Text
nextToken = Maybe Text
a} :: GetCurrentMetricData)
getCurrentMetricData_groupings :: Lens.Lens' GetCurrentMetricData (Prelude.Maybe [Grouping])
getCurrentMetricData_groupings :: (Maybe [Grouping] -> f (Maybe [Grouping]))
-> GetCurrentMetricData -> f GetCurrentMetricData
getCurrentMetricData_groupings = (GetCurrentMetricData -> Maybe [Grouping])
-> (GetCurrentMetricData
-> Maybe [Grouping] -> GetCurrentMetricData)
-> Lens
GetCurrentMetricData
GetCurrentMetricData
(Maybe [Grouping])
(Maybe [Grouping])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCurrentMetricData' {Maybe [Grouping]
groupings :: Maybe [Grouping]
$sel:groupings:GetCurrentMetricData' :: GetCurrentMetricData -> Maybe [Grouping]
groupings} -> Maybe [Grouping]
groupings) (\s :: GetCurrentMetricData
s@GetCurrentMetricData' {} Maybe [Grouping]
a -> GetCurrentMetricData
s {$sel:groupings:GetCurrentMetricData' :: Maybe [Grouping]
groupings = Maybe [Grouping]
a} :: GetCurrentMetricData) ((Maybe [Grouping] -> f (Maybe [Grouping]))
-> GetCurrentMetricData -> f GetCurrentMetricData)
-> ((Maybe [Grouping] -> f (Maybe [Grouping]))
-> Maybe [Grouping] -> f (Maybe [Grouping]))
-> (Maybe [Grouping] -> f (Maybe [Grouping]))
-> GetCurrentMetricData
-> f GetCurrentMetricData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Grouping] [Grouping] [Grouping] [Grouping]
-> Iso
(Maybe [Grouping])
(Maybe [Grouping])
(Maybe [Grouping])
(Maybe [Grouping])
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 [Grouping] [Grouping] [Grouping] [Grouping]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getCurrentMetricData_maxResults :: Lens.Lens' GetCurrentMetricData (Prelude.Maybe Prelude.Natural)
getCurrentMetricData_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetCurrentMetricData -> f GetCurrentMetricData
getCurrentMetricData_maxResults = (GetCurrentMetricData -> Maybe Natural)
-> (GetCurrentMetricData -> Maybe Natural -> GetCurrentMetricData)
-> Lens
GetCurrentMetricData
GetCurrentMetricData
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCurrentMetricData' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetCurrentMetricData' :: GetCurrentMetricData -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetCurrentMetricData
s@GetCurrentMetricData' {} Maybe Natural
a -> GetCurrentMetricData
s {$sel:maxResults:GetCurrentMetricData' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetCurrentMetricData)
getCurrentMetricData_instanceId :: Lens.Lens' GetCurrentMetricData Prelude.Text
getCurrentMetricData_instanceId :: (Text -> f Text) -> GetCurrentMetricData -> f GetCurrentMetricData
getCurrentMetricData_instanceId = (GetCurrentMetricData -> Text)
-> (GetCurrentMetricData -> Text -> GetCurrentMetricData)
-> Lens GetCurrentMetricData GetCurrentMetricData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCurrentMetricData' {Text
instanceId :: Text
$sel:instanceId:GetCurrentMetricData' :: GetCurrentMetricData -> Text
instanceId} -> Text
instanceId) (\s :: GetCurrentMetricData
s@GetCurrentMetricData' {} Text
a -> GetCurrentMetricData
s {$sel:instanceId:GetCurrentMetricData' :: Text
instanceId = Text
a} :: GetCurrentMetricData)
getCurrentMetricData_filters :: Lens.Lens' GetCurrentMetricData Filters
getCurrentMetricData_filters :: (Filters -> f Filters)
-> GetCurrentMetricData -> f GetCurrentMetricData
getCurrentMetricData_filters = (GetCurrentMetricData -> Filters)
-> (GetCurrentMetricData -> Filters -> GetCurrentMetricData)
-> Lens GetCurrentMetricData GetCurrentMetricData Filters Filters
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCurrentMetricData' {Filters
filters :: Filters
$sel:filters:GetCurrentMetricData' :: GetCurrentMetricData -> Filters
filters} -> Filters
filters) (\s :: GetCurrentMetricData
s@GetCurrentMetricData' {} Filters
a -> GetCurrentMetricData
s {$sel:filters:GetCurrentMetricData' :: Filters
filters = Filters
a} :: GetCurrentMetricData)
getCurrentMetricData_currentMetrics :: Lens.Lens' GetCurrentMetricData [CurrentMetric]
getCurrentMetricData_currentMetrics :: ([CurrentMetric] -> f [CurrentMetric])
-> GetCurrentMetricData -> f GetCurrentMetricData
getCurrentMetricData_currentMetrics = (GetCurrentMetricData -> [CurrentMetric])
-> (GetCurrentMetricData
-> [CurrentMetric] -> GetCurrentMetricData)
-> Lens
GetCurrentMetricData
GetCurrentMetricData
[CurrentMetric]
[CurrentMetric]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCurrentMetricData' {[CurrentMetric]
currentMetrics :: [CurrentMetric]
$sel:currentMetrics:GetCurrentMetricData' :: GetCurrentMetricData -> [CurrentMetric]
currentMetrics} -> [CurrentMetric]
currentMetrics) (\s :: GetCurrentMetricData
s@GetCurrentMetricData' {} [CurrentMetric]
a -> GetCurrentMetricData
s {$sel:currentMetrics:GetCurrentMetricData' :: [CurrentMetric]
currentMetrics = [CurrentMetric]
a} :: GetCurrentMetricData) (([CurrentMetric] -> f [CurrentMetric])
-> GetCurrentMetricData -> f GetCurrentMetricData)
-> (([CurrentMetric] -> f [CurrentMetric])
-> [CurrentMetric] -> f [CurrentMetric])
-> ([CurrentMetric] -> f [CurrentMetric])
-> GetCurrentMetricData
-> f GetCurrentMetricData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([CurrentMetric] -> f [CurrentMetric])
-> [CurrentMetric] -> f [CurrentMetric]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest GetCurrentMetricData where
type
AWSResponse GetCurrentMetricData =
GetCurrentMetricDataResponse
request :: GetCurrentMetricData -> Request GetCurrentMetricData
request = Service -> GetCurrentMetricData -> Request GetCurrentMetricData
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetCurrentMetricData
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetCurrentMetricData)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetCurrentMetricData))
-> Logger
-> Service
-> Proxy GetCurrentMetricData
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetCurrentMetricData)))
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 [CurrentMetricResult]
-> Maybe POSIX -> Maybe Text -> Int -> GetCurrentMetricDataResponse
GetCurrentMetricDataResponse'
(Maybe [CurrentMetricResult]
-> Maybe POSIX
-> Maybe Text
-> Int
-> GetCurrentMetricDataResponse)
-> Either String (Maybe [CurrentMetricResult])
-> Either
String
(Maybe POSIX -> Maybe Text -> Int -> GetCurrentMetricDataResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe (Maybe [CurrentMetricResult]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MetricResults" Either String (Maybe (Maybe [CurrentMetricResult]))
-> Maybe [CurrentMetricResult]
-> Either String (Maybe [CurrentMetricResult])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [CurrentMetricResult]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe POSIX -> Maybe Text -> Int -> GetCurrentMetricDataResponse)
-> Either String (Maybe POSIX)
-> Either
String (Maybe Text -> Int -> GetCurrentMetricDataResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataSnapshotTime")
Either String (Maybe Text -> Int -> GetCurrentMetricDataResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetCurrentMetricDataResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either String (Int -> GetCurrentMetricDataResponse)
-> Either String Int -> Either String GetCurrentMetricDataResponse
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 GetCurrentMetricData
instance Prelude.NFData GetCurrentMetricData
instance Core.ToHeaders GetCurrentMetricData where
toHeaders :: GetCurrentMetricData -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetCurrentMetricData -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 GetCurrentMetricData where
toJSON :: GetCurrentMetricData -> Value
toJSON GetCurrentMetricData' {[CurrentMetric]
Maybe Natural
Maybe [Grouping]
Maybe Text
Text
Filters
currentMetrics :: [CurrentMetric]
filters :: Filters
instanceId :: Text
maxResults :: Maybe Natural
groupings :: Maybe [Grouping]
nextToken :: Maybe Text
$sel:currentMetrics:GetCurrentMetricData' :: GetCurrentMetricData -> [CurrentMetric]
$sel:filters:GetCurrentMetricData' :: GetCurrentMetricData -> Filters
$sel:instanceId:GetCurrentMetricData' :: GetCurrentMetricData -> Text
$sel:maxResults:GetCurrentMetricData' :: GetCurrentMetricData -> Maybe Natural
$sel:groupings:GetCurrentMetricData' :: GetCurrentMetricData -> Maybe [Grouping]
$sel:nextToken:GetCurrentMetricData' :: GetCurrentMetricData -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"Groupings" Text -> [Grouping] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Grouping] -> Pair) -> Maybe [Grouping] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Grouping]
groupings,
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Filters" Text -> Filters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Filters
filters),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"CurrentMetrics" Text -> [CurrentMetric] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [CurrentMetric]
currentMetrics)
]
)
instance Core.ToPath GetCurrentMetricData where
toPath :: GetCurrentMetricData -> ByteString
toPath GetCurrentMetricData' {[CurrentMetric]
Maybe Natural
Maybe [Grouping]
Maybe Text
Text
Filters
currentMetrics :: [CurrentMetric]
filters :: Filters
instanceId :: Text
maxResults :: Maybe Natural
groupings :: Maybe [Grouping]
nextToken :: Maybe Text
$sel:currentMetrics:GetCurrentMetricData' :: GetCurrentMetricData -> [CurrentMetric]
$sel:filters:GetCurrentMetricData' :: GetCurrentMetricData -> Filters
$sel:instanceId:GetCurrentMetricData' :: GetCurrentMetricData -> Text
$sel:maxResults:GetCurrentMetricData' :: GetCurrentMetricData -> Maybe Natural
$sel:groupings:GetCurrentMetricData' :: GetCurrentMetricData -> Maybe [Grouping]
$sel:nextToken:GetCurrentMetricData' :: GetCurrentMetricData -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/metrics/current/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId]
instance Core.ToQuery GetCurrentMetricData where
toQuery :: GetCurrentMetricData -> QueryString
toQuery = QueryString -> GetCurrentMetricData -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetCurrentMetricDataResponse = GetCurrentMetricDataResponse'
{
GetCurrentMetricDataResponse -> Maybe [CurrentMetricResult]
metricResults :: Prelude.Maybe [CurrentMetricResult],
GetCurrentMetricDataResponse -> Maybe POSIX
dataSnapshotTime :: Prelude.Maybe Core.POSIX,
GetCurrentMetricDataResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetCurrentMetricDataResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetCurrentMetricDataResponse
-> GetCurrentMetricDataResponse -> Bool
(GetCurrentMetricDataResponse
-> GetCurrentMetricDataResponse -> Bool)
-> (GetCurrentMetricDataResponse
-> GetCurrentMetricDataResponse -> Bool)
-> Eq GetCurrentMetricDataResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCurrentMetricDataResponse
-> GetCurrentMetricDataResponse -> Bool
$c/= :: GetCurrentMetricDataResponse
-> GetCurrentMetricDataResponse -> Bool
== :: GetCurrentMetricDataResponse
-> GetCurrentMetricDataResponse -> Bool
$c== :: GetCurrentMetricDataResponse
-> GetCurrentMetricDataResponse -> Bool
Prelude.Eq, ReadPrec [GetCurrentMetricDataResponse]
ReadPrec GetCurrentMetricDataResponse
Int -> ReadS GetCurrentMetricDataResponse
ReadS [GetCurrentMetricDataResponse]
(Int -> ReadS GetCurrentMetricDataResponse)
-> ReadS [GetCurrentMetricDataResponse]
-> ReadPrec GetCurrentMetricDataResponse
-> ReadPrec [GetCurrentMetricDataResponse]
-> Read GetCurrentMetricDataResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCurrentMetricDataResponse]
$creadListPrec :: ReadPrec [GetCurrentMetricDataResponse]
readPrec :: ReadPrec GetCurrentMetricDataResponse
$creadPrec :: ReadPrec GetCurrentMetricDataResponse
readList :: ReadS [GetCurrentMetricDataResponse]
$creadList :: ReadS [GetCurrentMetricDataResponse]
readsPrec :: Int -> ReadS GetCurrentMetricDataResponse
$creadsPrec :: Int -> ReadS GetCurrentMetricDataResponse
Prelude.Read, Int -> GetCurrentMetricDataResponse -> ShowS
[GetCurrentMetricDataResponse] -> ShowS
GetCurrentMetricDataResponse -> String
(Int -> GetCurrentMetricDataResponse -> ShowS)
-> (GetCurrentMetricDataResponse -> String)
-> ([GetCurrentMetricDataResponse] -> ShowS)
-> Show GetCurrentMetricDataResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCurrentMetricDataResponse] -> ShowS
$cshowList :: [GetCurrentMetricDataResponse] -> ShowS
show :: GetCurrentMetricDataResponse -> String
$cshow :: GetCurrentMetricDataResponse -> String
showsPrec :: Int -> GetCurrentMetricDataResponse -> ShowS
$cshowsPrec :: Int -> GetCurrentMetricDataResponse -> ShowS
Prelude.Show, (forall x.
GetCurrentMetricDataResponse -> Rep GetCurrentMetricDataResponse x)
-> (forall x.
Rep GetCurrentMetricDataResponse x -> GetCurrentMetricDataResponse)
-> Generic GetCurrentMetricDataResponse
forall x.
Rep GetCurrentMetricDataResponse x -> GetCurrentMetricDataResponse
forall x.
GetCurrentMetricDataResponse -> Rep GetCurrentMetricDataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCurrentMetricDataResponse x -> GetCurrentMetricDataResponse
$cfrom :: forall x.
GetCurrentMetricDataResponse -> Rep GetCurrentMetricDataResponse x
Prelude.Generic)
newGetCurrentMetricDataResponse ::
Prelude.Int ->
GetCurrentMetricDataResponse
newGetCurrentMetricDataResponse :: Int -> GetCurrentMetricDataResponse
newGetCurrentMetricDataResponse Int
pHttpStatus_ =
GetCurrentMetricDataResponse' :: Maybe [CurrentMetricResult]
-> Maybe POSIX -> Maybe Text -> Int -> GetCurrentMetricDataResponse
GetCurrentMetricDataResponse'
{ $sel:metricResults:GetCurrentMetricDataResponse' :: Maybe [CurrentMetricResult]
metricResults =
Maybe [CurrentMetricResult]
forall a. Maybe a
Prelude.Nothing,
$sel:dataSnapshotTime:GetCurrentMetricDataResponse' :: Maybe POSIX
dataSnapshotTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetCurrentMetricDataResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetCurrentMetricDataResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getCurrentMetricDataResponse_metricResults :: Lens.Lens' GetCurrentMetricDataResponse (Prelude.Maybe [CurrentMetricResult])
getCurrentMetricDataResponse_metricResults :: (Maybe [CurrentMetricResult] -> f (Maybe [CurrentMetricResult]))
-> GetCurrentMetricDataResponse -> f GetCurrentMetricDataResponse
getCurrentMetricDataResponse_metricResults = (GetCurrentMetricDataResponse -> Maybe [CurrentMetricResult])
-> (GetCurrentMetricDataResponse
-> Maybe [CurrentMetricResult] -> GetCurrentMetricDataResponse)
-> Lens
GetCurrentMetricDataResponse
GetCurrentMetricDataResponse
(Maybe [CurrentMetricResult])
(Maybe [CurrentMetricResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCurrentMetricDataResponse' {Maybe [CurrentMetricResult]
metricResults :: Maybe [CurrentMetricResult]
$sel:metricResults:GetCurrentMetricDataResponse' :: GetCurrentMetricDataResponse -> Maybe [CurrentMetricResult]
metricResults} -> Maybe [CurrentMetricResult]
metricResults) (\s :: GetCurrentMetricDataResponse
s@GetCurrentMetricDataResponse' {} Maybe [CurrentMetricResult]
a -> GetCurrentMetricDataResponse
s {$sel:metricResults:GetCurrentMetricDataResponse' :: Maybe [CurrentMetricResult]
metricResults = Maybe [CurrentMetricResult]
a} :: GetCurrentMetricDataResponse) ((Maybe [CurrentMetricResult] -> f (Maybe [CurrentMetricResult]))
-> GetCurrentMetricDataResponse -> f GetCurrentMetricDataResponse)
-> ((Maybe [CurrentMetricResult]
-> f (Maybe [CurrentMetricResult]))
-> Maybe [CurrentMetricResult] -> f (Maybe [CurrentMetricResult]))
-> (Maybe [CurrentMetricResult] -> f (Maybe [CurrentMetricResult]))
-> GetCurrentMetricDataResponse
-> f GetCurrentMetricDataResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[CurrentMetricResult]
[CurrentMetricResult]
[CurrentMetricResult]
[CurrentMetricResult]
-> Iso
(Maybe [CurrentMetricResult])
(Maybe [CurrentMetricResult])
(Maybe [CurrentMetricResult])
(Maybe [CurrentMetricResult])
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
[CurrentMetricResult]
[CurrentMetricResult]
[CurrentMetricResult]
[CurrentMetricResult]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getCurrentMetricDataResponse_dataSnapshotTime :: Lens.Lens' GetCurrentMetricDataResponse (Prelude.Maybe Prelude.UTCTime)
getCurrentMetricDataResponse_dataSnapshotTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetCurrentMetricDataResponse -> f GetCurrentMetricDataResponse
getCurrentMetricDataResponse_dataSnapshotTime = (GetCurrentMetricDataResponse -> Maybe POSIX)
-> (GetCurrentMetricDataResponse
-> Maybe POSIX -> GetCurrentMetricDataResponse)
-> Lens
GetCurrentMetricDataResponse
GetCurrentMetricDataResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCurrentMetricDataResponse' {Maybe POSIX
dataSnapshotTime :: Maybe POSIX
$sel:dataSnapshotTime:GetCurrentMetricDataResponse' :: GetCurrentMetricDataResponse -> Maybe POSIX
dataSnapshotTime} -> Maybe POSIX
dataSnapshotTime) (\s :: GetCurrentMetricDataResponse
s@GetCurrentMetricDataResponse' {} Maybe POSIX
a -> GetCurrentMetricDataResponse
s {$sel:dataSnapshotTime:GetCurrentMetricDataResponse' :: Maybe POSIX
dataSnapshotTime = Maybe POSIX
a} :: GetCurrentMetricDataResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> GetCurrentMetricDataResponse -> f GetCurrentMetricDataResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetCurrentMetricDataResponse
-> f GetCurrentMetricDataResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
getCurrentMetricDataResponse_nextToken :: Lens.Lens' GetCurrentMetricDataResponse (Prelude.Maybe Prelude.Text)
getCurrentMetricDataResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetCurrentMetricDataResponse -> f GetCurrentMetricDataResponse
getCurrentMetricDataResponse_nextToken = (GetCurrentMetricDataResponse -> Maybe Text)
-> (GetCurrentMetricDataResponse
-> Maybe Text -> GetCurrentMetricDataResponse)
-> Lens
GetCurrentMetricDataResponse
GetCurrentMetricDataResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCurrentMetricDataResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetCurrentMetricDataResponse' :: GetCurrentMetricDataResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetCurrentMetricDataResponse
s@GetCurrentMetricDataResponse' {} Maybe Text
a -> GetCurrentMetricDataResponse
s {$sel:nextToken:GetCurrentMetricDataResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetCurrentMetricDataResponse)
getCurrentMetricDataResponse_httpStatus :: Lens.Lens' GetCurrentMetricDataResponse Prelude.Int
getCurrentMetricDataResponse_httpStatus :: (Int -> f Int)
-> GetCurrentMetricDataResponse -> f GetCurrentMetricDataResponse
getCurrentMetricDataResponse_httpStatus = (GetCurrentMetricDataResponse -> Int)
-> (GetCurrentMetricDataResponse
-> Int -> GetCurrentMetricDataResponse)
-> Lens
GetCurrentMetricDataResponse GetCurrentMetricDataResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCurrentMetricDataResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetCurrentMetricDataResponse' :: GetCurrentMetricDataResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetCurrentMetricDataResponse
s@GetCurrentMetricDataResponse' {} Int
a -> GetCurrentMetricDataResponse
s {$sel:httpStatus:GetCurrentMetricDataResponse' :: Int
httpStatus = Int
a} :: GetCurrentMetricDataResponse)
instance Prelude.NFData GetCurrentMetricDataResponse