{-# 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_maxResults,
getUsageStatistics_nextToken,
getUsageStatistics_unit,
getUsageStatistics_detectorId,
getUsageStatistics_usageStatisticType,
getUsageStatistics_usageCriteria,
GetUsageStatisticsResponse (..),
newGetUsageStatisticsResponse,
getUsageStatisticsResponse_nextToken,
getUsageStatisticsResponse_usageStatistics,
getUsageStatisticsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GuardDuty.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetUsageStatistics = GetUsageStatistics'
{
GetUsageStatistics -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetUsageStatistics -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetUsageStatistics -> Maybe Text
unit :: Prelude.Maybe Prelude.Text,
GetUsageStatistics -> Text
detectorId :: Prelude.Text,
GetUsageStatistics -> UsageStatisticType
usageStatisticType :: UsageStatisticType,
GetUsageStatistics -> UsageCriteria
usageCriteria :: UsageCriteria
}
deriving (GetUsageStatistics -> GetUsageStatistics -> Bool
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]
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
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. 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'
{ $sel:maxResults:GetUsageStatistics' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetUsageStatistics' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:unit:GetUsageStatistics' :: Maybe Text
unit = 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_maxResults :: Lens.Lens' GetUsageStatistics (Prelude.Maybe Prelude.Natural)
getUsageStatistics_maxResults :: Lens' GetUsageStatistics (Maybe Natural)
getUsageStatistics_maxResults = 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_nextToken :: Lens.Lens' GetUsageStatistics (Prelude.Maybe Prelude.Text)
getUsageStatistics_nextToken :: Lens' GetUsageStatistics (Maybe Text)
getUsageStatistics_nextToken = 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 :: Lens' GetUsageStatistics (Maybe Text)
getUsageStatistics_unit = 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_detectorId :: Lens.Lens' GetUsageStatistics Prelude.Text
getUsageStatistics_detectorId :: Lens' GetUsageStatistics Text
getUsageStatistics_detectorId = 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 :: Lens' GetUsageStatistics UsageStatisticType
getUsageStatistics_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 :: Lens' GetUsageStatistics UsageCriteria
getUsageStatistics_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 :: (Service -> Service)
-> GetUsageStatistics -> Request GetUsageStatistics
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetUsageStatistics
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetUsageStatistics)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe UsageStatistics -> Int -> GetUsageStatisticsResponse
GetUsageStatisticsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"usageStatistics")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable GetUsageStatistics where
hashWithSalt :: Int -> GetUsageStatistics -> Int
hashWithSalt Int
_salt GetUsageStatistics' {Maybe Natural
Maybe Text
Text
UsageCriteria
UsageStatisticType
usageCriteria :: UsageCriteria
usageStatisticType :: UsageStatisticType
detectorId :: Text
unit :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:usageCriteria:GetUsageStatistics' :: GetUsageStatistics -> UsageCriteria
$sel:usageStatisticType:GetUsageStatistics' :: GetUsageStatistics -> UsageStatisticType
$sel:detectorId:GetUsageStatistics' :: GetUsageStatistics -> Text
$sel:unit:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
$sel:nextToken:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
$sel:maxResults:GetUsageStatistics' :: GetUsageStatistics -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
unit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
detectorId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` UsageStatisticType
usageStatisticType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` UsageCriteria
usageCriteria
instance Prelude.NFData GetUsageStatistics where
rnf :: GetUsageStatistics -> ()
rnf GetUsageStatistics' {Maybe Natural
Maybe Text
Text
UsageCriteria
UsageStatisticType
usageCriteria :: UsageCriteria
usageStatisticType :: UsageStatisticType
detectorId :: Text
unit :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:usageCriteria:GetUsageStatistics' :: GetUsageStatistics -> UsageCriteria
$sel:usageStatisticType:GetUsageStatistics' :: GetUsageStatistics -> UsageStatisticType
$sel:detectorId:GetUsageStatistics' :: GetUsageStatistics -> Text
$sel:unit:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
$sel:nextToken:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
$sel:maxResults:GetUsageStatistics' :: GetUsageStatistics -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
unit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
detectorId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf UsageStatisticType
usageStatisticType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf UsageCriteria
usageCriteria
instance Data.ToHeaders GetUsageStatistics where
toHeaders :: GetUsageStatistics -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON GetUsageStatistics where
toJSON :: GetUsageStatistics -> Value
toJSON GetUsageStatistics' {Maybe Natural
Maybe Text
Text
UsageCriteria
UsageStatisticType
usageCriteria :: UsageCriteria
usageStatisticType :: UsageStatisticType
detectorId :: Text
unit :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:usageCriteria:GetUsageStatistics' :: GetUsageStatistics -> UsageCriteria
$sel:usageStatisticType:GetUsageStatistics' :: GetUsageStatistics -> UsageStatisticType
$sel:detectorId:GetUsageStatistics' :: GetUsageStatistics -> Text
$sel:unit:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
$sel:nextToken:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
$sel:maxResults:GetUsageStatistics' :: GetUsageStatistics -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"maxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Key
"unit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
unit,
forall a. a -> Maybe a
Prelude.Just
(Key
"usageStatisticsType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= UsageStatisticType
usageStatisticType),
forall a. a -> Maybe a
Prelude.Just
(Key
"usageCriteria" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= UsageCriteria
usageCriteria)
]
)
instance Data.ToPath GetUsageStatistics where
toPath :: GetUsageStatistics -> ByteString
toPath GetUsageStatistics' {Maybe Natural
Maybe Text
Text
UsageCriteria
UsageStatisticType
usageCriteria :: UsageCriteria
usageStatisticType :: UsageStatisticType
detectorId :: Text
unit :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:usageCriteria:GetUsageStatistics' :: GetUsageStatistics -> UsageCriteria
$sel:usageStatisticType:GetUsageStatistics' :: GetUsageStatistics -> UsageStatisticType
$sel:detectorId:GetUsageStatistics' :: GetUsageStatistics -> Text
$sel:unit:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
$sel:nextToken:GetUsageStatistics' :: GetUsageStatistics -> Maybe Text
$sel:maxResults:GetUsageStatistics' :: GetUsageStatistics -> Maybe Natural
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/detector/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
detectorId,
ByteString
"/usage/statistics"
]
instance Data.ToQuery GetUsageStatistics where
toQuery :: GetUsageStatistics -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetUsageStatisticsResponse = GetUsageStatisticsResponse'
{
GetUsageStatisticsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetUsageStatisticsResponse -> Maybe UsageStatistics
usageStatistics :: Prelude.Maybe UsageStatistics,
GetUsageStatisticsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetUsageStatisticsResponse -> GetUsageStatisticsResponse -> Bool
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]
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
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.
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'
{ $sel:nextToken:GetUsageStatisticsResponse' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:usageStatistics:GetUsageStatisticsResponse' :: Maybe UsageStatistics
usageStatistics = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetUsageStatisticsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getUsageStatisticsResponse_nextToken :: Lens.Lens' GetUsageStatisticsResponse (Prelude.Maybe Prelude.Text)
getUsageStatisticsResponse_nextToken :: Lens' GetUsageStatisticsResponse (Maybe Text)
getUsageStatisticsResponse_nextToken = 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_usageStatistics :: Lens.Lens' GetUsageStatisticsResponse (Prelude.Maybe UsageStatistics)
getUsageStatisticsResponse_usageStatistics :: Lens' GetUsageStatisticsResponse (Maybe UsageStatistics)
getUsageStatisticsResponse_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_httpStatus :: Lens.Lens' GetUsageStatisticsResponse Prelude.Int
getUsageStatisticsResponse_httpStatus :: Lens' GetUsageStatisticsResponse Int
getUsageStatisticsResponse_httpStatus = 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 where
rnf :: GetUsageStatisticsResponse -> ()
rnf GetUsageStatisticsResponse' {Int
Maybe Text
Maybe UsageStatistics
httpStatus :: Int
usageStatistics :: Maybe UsageStatistics
nextToken :: Maybe Text
$sel:httpStatus:GetUsageStatisticsResponse' :: GetUsageStatisticsResponse -> Int
$sel:usageStatistics:GetUsageStatisticsResponse' :: GetUsageStatisticsResponse -> Maybe UsageStatistics
$sel:nextToken:GetUsageStatisticsResponse' :: GetUsageStatisticsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe UsageStatistics
usageStatistics
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus