{-# 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.GuardDuty.GetUsageStatistics
(
GetUsageStatistics (..),
newGetUsageStatistics,
getUsageStatistics_nextToken,
getUsageStatistics_unit,
getUsageStatistics_maxResults,
getUsageStatistics_detectorId,
getUsageStatistics_usageStatisticType,
getUsageStatistics_usageCriteria,
GetUsageStatisticsResponse (..),
newGetUsageStatisticsResponse,
getUsageStatisticsResponse_usageStatistics,
getUsageStatisticsResponse_nextToken,
getUsageStatisticsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.GuardDuty.Types
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 GetUsageStatistics = GetUsageStatistics'
{
GetUsageStatistics -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetUsageStatistics -> Maybe Text
unit :: Prelude.Maybe Prelude.Text,
GetUsageStatistics -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetUsageStatistics -> Text
detectorId :: Prelude.Text,
GetUsageStatistics -> UsageStatisticType
usageStatisticType :: UsageStatisticType,
GetUsageStatistics -> UsageCriteria
usageCriteria :: UsageCriteria
}
deriving (GetUsageStatistics -> GetUsageStatistics -> Bool
(GetUsageStatistics -> GetUsageStatistics -> Bool)
-> (GetUsageStatistics -> GetUsageStatistics -> Bool)
-> Eq GetUsageStatistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUsageStatistics -> GetUsageStatistics -> Bool
$c/= :: GetUsageStatistics -> GetUsageStatistics -> Bool
== :: GetUsageStatistics -> GetUsageStatistics -> Bool
$c== :: GetUsageStatistics -> GetUsageStatistics -> Bool
Prelude.Eq, ReadPrec [GetUsageStatistics]
ReadPrec GetUsageStatistics
Int -> ReadS GetUsageStatistics
ReadS [GetUsageStatistics]
(Int -> ReadS GetUsageStatistics)
-> ReadS [GetUsageStatistics]
-> ReadPrec GetUsageStatistics
-> ReadPrec [GetUsageStatistics]
-> Read GetUsageStatistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUsageStatistics]
$creadListPrec :: ReadPrec [GetUsageStatistics]
readPrec :: ReadPrec GetUsageStatistics
$creadPrec :: ReadPrec GetUsageStatistics
readList :: ReadS [GetUsageStatistics]
$creadList :: ReadS [GetUsageStatistics]
readsPrec :: Int -> ReadS GetUsageStatistics
$creadsPrec :: Int -> ReadS GetUsageStatistics
Prelude.Read, Int -> GetUsageStatistics -> ShowS
[GetUsageStatistics] -> ShowS
GetUsageStatistics -> String
(Int -> GetUsageStatistics -> ShowS)
-> (GetUsageStatistics -> String)
-> ([GetUsageStatistics] -> ShowS)
-> Show GetUsageStatistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUsageStatistics] -> ShowS
$cshowList :: [GetUsageStatistics] -> ShowS
show :: GetUsageStatistics -> String
$cshow :: GetUsageStatistics -> String
showsPrec :: Int -> GetUsageStatistics -> ShowS
$cshowsPrec :: Int -> GetUsageStatistics -> ShowS
Prelude.Show, (forall x. GetUsageStatistics -> Rep GetUsageStatistics x)
-> (forall x. Rep GetUsageStatistics x -> GetUsageStatistics)
-> Generic GetUsageStatistics
forall x. Rep GetUsageStatistics x -> GetUsageStatistics
forall x. GetUsageStatistics -> Rep GetUsageStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetUsageStatistics x -> GetUsageStatistics
$cfrom :: forall x. GetUsageStatistics -> Rep GetUsageStatistics x
Prelude.Generic)
newGetUsageStatistics ::
Prelude.Text ->
UsageStatisticType ->
UsageCriteria ->
GetUsageStatistics
newGetUsageStatistics :: Text -> UsageStatisticType -> UsageCriteria -> GetUsageStatistics
newGetUsageStatistics
Text
pDetectorId_
UsageStatisticType
pUsageStatisticType_
UsageCriteria
pUsageCriteria_ =
GetUsageStatistics' :: Maybe Text
-> Maybe Text
-> Maybe Natural
-> Text
-> UsageStatisticType
-> UsageCriteria
-> GetUsageStatistics
GetUsageStatistics'
{ $sel:nextToken:GetUsageStatistics' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:unit:GetUsageStatistics' :: Maybe Text
unit = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetUsageStatistics' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:detectorId:GetUsageStatistics' :: Text
detectorId = Text
pDetectorId_,
$sel:usageStatisticType:GetUsageStatistics' :: UsageStatisticType
usageStatisticType = UsageStatisticType
pUsageStatisticType_,
$sel:usageCriteria:GetUsageStatistics' :: UsageCriteria
usageCriteria = UsageCriteria
pUsageCriteria_
}
getUsageStatistics_nextToken :: Lens.Lens' GetUsageStatistics (Prelude.Maybe Prelude.Text)
getUsageStatistics_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetUsageStatistics -> f GetUsageStatistics
getUsageStatistics_nextToken = (GetUsageStatistics -> Maybe Text)
-> (GetUsageStatistics -> Maybe Text -> GetUsageStatistics)
-> Lens
GetUsageStatistics GetUsageStatistics (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageStatistics' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetUsageStatistics
s@GetUsageStatistics' {} Maybe Text
a -> GetUsageStatistics
s {$sel:nextToken:GetUsageStatistics' :: Maybe Text
nextToken = Maybe Text
a} :: GetUsageStatistics)
getUsageStatistics_unit :: Lens.Lens' GetUsageStatistics (Prelude.Maybe Prelude.Text)
getUsageStatistics_unit :: (Maybe Text -> f (Maybe Text))
-> GetUsageStatistics -> f GetUsageStatistics
getUsageStatistics_unit = (GetUsageStatistics -> Maybe Text)
-> (GetUsageStatistics -> Maybe Text -> GetUsageStatistics)
-> Lens
GetUsageStatistics GetUsageStatistics (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageStatistics' {Maybe Text
unit :: Maybe Text
$sel:unit:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
unit} -> Maybe Text
unit) (\s :: GetUsageStatistics
s@GetUsageStatistics' {} Maybe Text
a -> GetUsageStatistics
s {$sel:unit:GetUsageStatistics' :: Maybe Text
unit = Maybe Text
a} :: GetUsageStatistics)
getUsageStatistics_maxResults :: Lens.Lens' GetUsageStatistics (Prelude.Maybe Prelude.Natural)
getUsageStatistics_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetUsageStatistics -> f GetUsageStatistics
getUsageStatistics_maxResults = (GetUsageStatistics -> Maybe Natural)
-> (GetUsageStatistics -> Maybe Natural -> GetUsageStatistics)
-> Lens
GetUsageStatistics
GetUsageStatistics
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageStatistics' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetUsageStatistics' :: GetUsageStatistics -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetUsageStatistics
s@GetUsageStatistics' {} Maybe Natural
a -> GetUsageStatistics
s {$sel:maxResults:GetUsageStatistics' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetUsageStatistics)
getUsageStatistics_detectorId :: Lens.Lens' GetUsageStatistics Prelude.Text
getUsageStatistics_detectorId :: (Text -> f Text) -> GetUsageStatistics -> f GetUsageStatistics
getUsageStatistics_detectorId = (GetUsageStatistics -> Text)
-> (GetUsageStatistics -> Text -> GetUsageStatistics)
-> Lens GetUsageStatistics GetUsageStatistics Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageStatistics' {Text
detectorId :: Text
$sel:detectorId:GetUsageStatistics' :: GetUsageStatistics -> Text
detectorId} -> Text
detectorId) (\s :: GetUsageStatistics
s@GetUsageStatistics' {} Text
a -> GetUsageStatistics
s {$sel:detectorId:GetUsageStatistics' :: Text
detectorId = Text
a} :: GetUsageStatistics)
getUsageStatistics_usageStatisticType :: Lens.Lens' GetUsageStatistics UsageStatisticType
getUsageStatistics_usageStatisticType :: (UsageStatisticType -> f UsageStatisticType)
-> GetUsageStatistics -> f GetUsageStatistics
getUsageStatistics_usageStatisticType = (GetUsageStatistics -> UsageStatisticType)
-> (GetUsageStatistics -> UsageStatisticType -> GetUsageStatistics)
-> Lens
GetUsageStatistics
GetUsageStatistics
UsageStatisticType
UsageStatisticType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageStatistics' {UsageStatisticType
usageStatisticType :: UsageStatisticType
$sel:usageStatisticType:GetUsageStatistics' :: GetUsageStatistics -> UsageStatisticType
usageStatisticType} -> UsageStatisticType
usageStatisticType) (\s :: GetUsageStatistics
s@GetUsageStatistics' {} UsageStatisticType
a -> GetUsageStatistics
s {$sel:usageStatisticType:GetUsageStatistics' :: UsageStatisticType
usageStatisticType = UsageStatisticType
a} :: GetUsageStatistics)
getUsageStatistics_usageCriteria :: Lens.Lens' GetUsageStatistics UsageCriteria
getUsageStatistics_usageCriteria :: (UsageCriteria -> f UsageCriteria)
-> GetUsageStatistics -> f GetUsageStatistics
getUsageStatistics_usageCriteria = (GetUsageStatistics -> UsageCriteria)
-> (GetUsageStatistics -> UsageCriteria -> GetUsageStatistics)
-> Lens
GetUsageStatistics GetUsageStatistics UsageCriteria UsageCriteria
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageStatistics' {UsageCriteria
usageCriteria :: UsageCriteria
$sel:usageCriteria:GetUsageStatistics' :: GetUsageStatistics -> UsageCriteria
usageCriteria} -> UsageCriteria
usageCriteria) (\s :: GetUsageStatistics
s@GetUsageStatistics' {} UsageCriteria
a -> GetUsageStatistics
s {$sel:usageCriteria:GetUsageStatistics' :: UsageCriteria
usageCriteria = UsageCriteria
a} :: GetUsageStatistics)
instance Core.AWSRequest GetUsageStatistics where
type
AWSResponse GetUsageStatistics =
GetUsageStatisticsResponse
request :: GetUsageStatistics -> Request GetUsageStatistics
request = Service -> GetUsageStatistics -> Request GetUsageStatistics
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetUsageStatistics
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetUsageStatistics)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetUsageStatistics))
-> Logger
-> Service
-> Proxy GetUsageStatistics
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetUsageStatistics)))
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 UsageStatistics
-> Maybe Text -> Int -> GetUsageStatisticsResponse
GetUsageStatisticsResponse'
(Maybe UsageStatistics
-> Maybe Text -> Int -> GetUsageStatisticsResponse)
-> Either String (Maybe UsageStatistics)
-> Either String (Maybe Text -> Int -> GetUsageStatisticsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe UsageStatistics)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"usageStatistics")
Either String (Maybe Text -> Int -> GetUsageStatisticsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetUsageStatisticsResponse)
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 -> GetUsageStatisticsResponse)
-> Either String Int -> Either String GetUsageStatisticsResponse
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 GetUsageStatistics
instance Prelude.NFData GetUsageStatistics
instance Core.ToHeaders GetUsageStatistics where
toHeaders :: GetUsageStatistics -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetUsageStatistics -> 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 GetUsageStatistics where
toJSON :: GetUsageStatistics -> Value
toJSON GetUsageStatistics' {Maybe Natural
Maybe Text
Text
UsageCriteria
UsageStatisticType
usageCriteria :: UsageCriteria
usageStatisticType :: UsageStatisticType
detectorId :: Text
maxResults :: Maybe Natural
unit :: Maybe Text
nextToken :: Maybe Text
$sel:usageCriteria:GetUsageStatistics' :: GetUsageStatistics -> UsageCriteria
$sel:usageStatisticType:GetUsageStatistics' :: GetUsageStatistics -> UsageStatisticType
$sel:detectorId:GetUsageStatistics' :: GetUsageStatistics -> Text
$sel:maxResults:GetUsageStatistics' :: GetUsageStatistics -> Maybe Natural
$sel:unit:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
$sel:nextToken:GetUsageStatistics' :: GetUsageStatistics -> 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
"unit" 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
unit,
(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
"usageStatisticsType" Text -> UsageStatisticType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= UsageStatisticType
usageStatisticType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"usageCriteria" Text -> UsageCriteria -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= UsageCriteria
usageCriteria)
]
)
instance Core.ToPath GetUsageStatistics where
toPath :: GetUsageStatistics -> ByteString
toPath GetUsageStatistics' {Maybe Natural
Maybe Text
Text
UsageCriteria
UsageStatisticType
usageCriteria :: UsageCriteria
usageStatisticType :: UsageStatisticType
detectorId :: Text
maxResults :: Maybe Natural
unit :: Maybe Text
nextToken :: Maybe Text
$sel:usageCriteria:GetUsageStatistics' :: GetUsageStatistics -> UsageCriteria
$sel:usageStatisticType:GetUsageStatistics' :: GetUsageStatistics -> UsageStatisticType
$sel:detectorId:GetUsageStatistics' :: GetUsageStatistics -> Text
$sel:maxResults:GetUsageStatistics' :: GetUsageStatistics -> Maybe Natural
$sel:unit:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
$sel:nextToken:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/detector/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
detectorId,
ByteString
"/usage/statistics"
]
instance Core.ToQuery GetUsageStatistics where
toQuery :: GetUsageStatistics -> QueryString
toQuery = QueryString -> GetUsageStatistics -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetUsageStatisticsResponse = GetUsageStatisticsResponse'
{
GetUsageStatisticsResponse -> Maybe UsageStatistics
usageStatistics :: Prelude.Maybe UsageStatistics,
GetUsageStatisticsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetUsageStatisticsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetUsageStatisticsResponse -> GetUsageStatisticsResponse -> Bool
(GetUsageStatisticsResponse -> GetUsageStatisticsResponse -> Bool)
-> (GetUsageStatisticsResponse
-> GetUsageStatisticsResponse -> Bool)
-> Eq GetUsageStatisticsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUsageStatisticsResponse -> GetUsageStatisticsResponse -> Bool
$c/= :: GetUsageStatisticsResponse -> GetUsageStatisticsResponse -> Bool
== :: GetUsageStatisticsResponse -> GetUsageStatisticsResponse -> Bool
$c== :: GetUsageStatisticsResponse -> GetUsageStatisticsResponse -> Bool
Prelude.Eq, ReadPrec [GetUsageStatisticsResponse]
ReadPrec GetUsageStatisticsResponse
Int -> ReadS GetUsageStatisticsResponse
ReadS [GetUsageStatisticsResponse]
(Int -> ReadS GetUsageStatisticsResponse)
-> ReadS [GetUsageStatisticsResponse]
-> ReadPrec GetUsageStatisticsResponse
-> ReadPrec [GetUsageStatisticsResponse]
-> Read GetUsageStatisticsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUsageStatisticsResponse]
$creadListPrec :: ReadPrec [GetUsageStatisticsResponse]
readPrec :: ReadPrec GetUsageStatisticsResponse
$creadPrec :: ReadPrec GetUsageStatisticsResponse
readList :: ReadS [GetUsageStatisticsResponse]
$creadList :: ReadS [GetUsageStatisticsResponse]
readsPrec :: Int -> ReadS GetUsageStatisticsResponse
$creadsPrec :: Int -> ReadS GetUsageStatisticsResponse
Prelude.Read, Int -> GetUsageStatisticsResponse -> ShowS
[GetUsageStatisticsResponse] -> ShowS
GetUsageStatisticsResponse -> String
(Int -> GetUsageStatisticsResponse -> ShowS)
-> (GetUsageStatisticsResponse -> String)
-> ([GetUsageStatisticsResponse] -> ShowS)
-> Show GetUsageStatisticsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUsageStatisticsResponse] -> ShowS
$cshowList :: [GetUsageStatisticsResponse] -> ShowS
show :: GetUsageStatisticsResponse -> String
$cshow :: GetUsageStatisticsResponse -> String
showsPrec :: Int -> GetUsageStatisticsResponse -> ShowS
$cshowsPrec :: Int -> GetUsageStatisticsResponse -> ShowS
Prelude.Show, (forall x.
GetUsageStatisticsResponse -> Rep GetUsageStatisticsResponse x)
-> (forall x.
Rep GetUsageStatisticsResponse x -> GetUsageStatisticsResponse)
-> Generic GetUsageStatisticsResponse
forall x.
Rep GetUsageStatisticsResponse x -> GetUsageStatisticsResponse
forall x.
GetUsageStatisticsResponse -> Rep GetUsageStatisticsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetUsageStatisticsResponse x -> GetUsageStatisticsResponse
$cfrom :: forall x.
GetUsageStatisticsResponse -> Rep GetUsageStatisticsResponse x
Prelude.Generic)
newGetUsageStatisticsResponse ::
Prelude.Int ->
GetUsageStatisticsResponse
newGetUsageStatisticsResponse :: Int -> GetUsageStatisticsResponse
newGetUsageStatisticsResponse Int
pHttpStatus_ =
GetUsageStatisticsResponse' :: Maybe UsageStatistics
-> Maybe Text -> Int -> GetUsageStatisticsResponse
GetUsageStatisticsResponse'
{ $sel:usageStatistics:GetUsageStatisticsResponse' :: Maybe UsageStatistics
usageStatistics =
Maybe UsageStatistics
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetUsageStatisticsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetUsageStatisticsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getUsageStatisticsResponse_usageStatistics :: Lens.Lens' GetUsageStatisticsResponse (Prelude.Maybe UsageStatistics)
getUsageStatisticsResponse_usageStatistics :: (Maybe UsageStatistics -> f (Maybe UsageStatistics))
-> GetUsageStatisticsResponse -> f GetUsageStatisticsResponse
getUsageStatisticsResponse_usageStatistics = (GetUsageStatisticsResponse -> Maybe UsageStatistics)
-> (GetUsageStatisticsResponse
-> Maybe UsageStatistics -> GetUsageStatisticsResponse)
-> Lens
GetUsageStatisticsResponse
GetUsageStatisticsResponse
(Maybe UsageStatistics)
(Maybe UsageStatistics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageStatisticsResponse' {Maybe UsageStatistics
usageStatistics :: Maybe UsageStatistics
$sel:usageStatistics:GetUsageStatisticsResponse' :: GetUsageStatisticsResponse -> Maybe UsageStatistics
usageStatistics} -> Maybe UsageStatistics
usageStatistics) (\s :: GetUsageStatisticsResponse
s@GetUsageStatisticsResponse' {} Maybe UsageStatistics
a -> GetUsageStatisticsResponse
s {$sel:usageStatistics:GetUsageStatisticsResponse' :: Maybe UsageStatistics
usageStatistics = Maybe UsageStatistics
a} :: GetUsageStatisticsResponse)
getUsageStatisticsResponse_nextToken :: Lens.Lens' GetUsageStatisticsResponse (Prelude.Maybe Prelude.Text)
getUsageStatisticsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetUsageStatisticsResponse -> f GetUsageStatisticsResponse
getUsageStatisticsResponse_nextToken = (GetUsageStatisticsResponse -> Maybe Text)
-> (GetUsageStatisticsResponse
-> Maybe Text -> GetUsageStatisticsResponse)
-> Lens
GetUsageStatisticsResponse
GetUsageStatisticsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageStatisticsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetUsageStatisticsResponse' :: GetUsageStatisticsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetUsageStatisticsResponse
s@GetUsageStatisticsResponse' {} Maybe Text
a -> GetUsageStatisticsResponse
s {$sel:nextToken:GetUsageStatisticsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetUsageStatisticsResponse)
getUsageStatisticsResponse_httpStatus :: Lens.Lens' GetUsageStatisticsResponse Prelude.Int
getUsageStatisticsResponse_httpStatus :: (Int -> f Int)
-> GetUsageStatisticsResponse -> f GetUsageStatisticsResponse
getUsageStatisticsResponse_httpStatus = (GetUsageStatisticsResponse -> Int)
-> (GetUsageStatisticsResponse
-> Int -> GetUsageStatisticsResponse)
-> Lens
GetUsageStatisticsResponse GetUsageStatisticsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUsageStatisticsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetUsageStatisticsResponse' :: GetUsageStatisticsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetUsageStatisticsResponse
s@GetUsageStatisticsResponse' {} Int
a -> GetUsageStatisticsResponse
s {$sel:httpStatus:GetUsageStatisticsResponse' :: Int
httpStatus = Int
a} :: GetUsageStatisticsResponse)
instance Prelude.NFData GetUsageStatisticsResponse