{-# 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.Athena.ListApplicationDPUSizes
(
ListApplicationDPUSizes (..),
newListApplicationDPUSizes,
listApplicationDPUSizes_maxResults,
listApplicationDPUSizes_nextToken,
ListApplicationDPUSizesResponse (..),
newListApplicationDPUSizesResponse,
listApplicationDPUSizesResponse_applicationDPUSizes,
listApplicationDPUSizesResponse_nextToken,
listApplicationDPUSizesResponse_httpStatus,
)
where
import Amazonka.Athena.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListApplicationDPUSizes = ListApplicationDPUSizes'
{
ListApplicationDPUSizes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListApplicationDPUSizes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
}
deriving (ListApplicationDPUSizes -> ListApplicationDPUSizes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplicationDPUSizes -> ListApplicationDPUSizes -> Bool
$c/= :: ListApplicationDPUSizes -> ListApplicationDPUSizes -> Bool
== :: ListApplicationDPUSizes -> ListApplicationDPUSizes -> Bool
$c== :: ListApplicationDPUSizes -> ListApplicationDPUSizes -> Bool
Prelude.Eq, ReadPrec [ListApplicationDPUSizes]
ReadPrec ListApplicationDPUSizes
Int -> ReadS ListApplicationDPUSizes
ReadS [ListApplicationDPUSizes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplicationDPUSizes]
$creadListPrec :: ReadPrec [ListApplicationDPUSizes]
readPrec :: ReadPrec ListApplicationDPUSizes
$creadPrec :: ReadPrec ListApplicationDPUSizes
readList :: ReadS [ListApplicationDPUSizes]
$creadList :: ReadS [ListApplicationDPUSizes]
readsPrec :: Int -> ReadS ListApplicationDPUSizes
$creadsPrec :: Int -> ReadS ListApplicationDPUSizes
Prelude.Read, Int -> ListApplicationDPUSizes -> ShowS
[ListApplicationDPUSizes] -> ShowS
ListApplicationDPUSizes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplicationDPUSizes] -> ShowS
$cshowList :: [ListApplicationDPUSizes] -> ShowS
show :: ListApplicationDPUSizes -> String
$cshow :: ListApplicationDPUSizes -> String
showsPrec :: Int -> ListApplicationDPUSizes -> ShowS
$cshowsPrec :: Int -> ListApplicationDPUSizes -> ShowS
Prelude.Show, forall x. Rep ListApplicationDPUSizes x -> ListApplicationDPUSizes
forall x. ListApplicationDPUSizes -> Rep ListApplicationDPUSizes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListApplicationDPUSizes x -> ListApplicationDPUSizes
$cfrom :: forall x. ListApplicationDPUSizes -> Rep ListApplicationDPUSizes x
Prelude.Generic)
newListApplicationDPUSizes ::
ListApplicationDPUSizes
newListApplicationDPUSizes :: ListApplicationDPUSizes
newListApplicationDPUSizes =
ListApplicationDPUSizes'
{ $sel:maxResults:ListApplicationDPUSizes' :: Maybe Natural
maxResults =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListApplicationDPUSizes' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
}
listApplicationDPUSizes_maxResults :: Lens.Lens' ListApplicationDPUSizes (Prelude.Maybe Prelude.Natural)
listApplicationDPUSizes_maxResults :: Lens' ListApplicationDPUSizes (Maybe Natural)
listApplicationDPUSizes_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationDPUSizes' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListApplicationDPUSizes' :: ListApplicationDPUSizes -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListApplicationDPUSizes
s@ListApplicationDPUSizes' {} Maybe Natural
a -> ListApplicationDPUSizes
s {$sel:maxResults:ListApplicationDPUSizes' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListApplicationDPUSizes)
listApplicationDPUSizes_nextToken :: Lens.Lens' ListApplicationDPUSizes (Prelude.Maybe Prelude.Text)
listApplicationDPUSizes_nextToken :: Lens' ListApplicationDPUSizes (Maybe Text)
listApplicationDPUSizes_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationDPUSizes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplicationDPUSizes' :: ListApplicationDPUSizes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplicationDPUSizes
s@ListApplicationDPUSizes' {} Maybe Text
a -> ListApplicationDPUSizes
s {$sel:nextToken:ListApplicationDPUSizes' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplicationDPUSizes)
instance Core.AWSRequest ListApplicationDPUSizes where
type
AWSResponse ListApplicationDPUSizes =
ListApplicationDPUSizesResponse
request :: (Service -> Service)
-> ListApplicationDPUSizes -> Request ListApplicationDPUSizes
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 ListApplicationDPUSizes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListApplicationDPUSizes)))
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 [ApplicationDPUSizes]
-> Maybe Text -> Int -> ListApplicationDPUSizesResponse
ListApplicationDPUSizesResponse'
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
"ApplicationDPUSizes"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
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
"NextToken")
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 ListApplicationDPUSizes where
hashWithSalt :: Int -> ListApplicationDPUSizes -> Int
hashWithSalt Int
_salt ListApplicationDPUSizes' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListApplicationDPUSizes' :: ListApplicationDPUSizes -> Maybe Text
$sel:maxResults:ListApplicationDPUSizes' :: ListApplicationDPUSizes -> 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
instance Prelude.NFData ListApplicationDPUSizes where
rnf :: ListApplicationDPUSizes -> ()
rnf ListApplicationDPUSizes' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListApplicationDPUSizes' :: ListApplicationDPUSizes -> Maybe Text
$sel:maxResults:ListApplicationDPUSizes' :: ListApplicationDPUSizes -> 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
instance Data.ToHeaders ListApplicationDPUSizes where
toHeaders :: ListApplicationDPUSizes -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AmazonAthena.ListApplicationDPUSizes" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON ListApplicationDPUSizes where
toJSON :: ListApplicationDPUSizes -> Value
toJSON ListApplicationDPUSizes' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListApplicationDPUSizes' :: ListApplicationDPUSizes -> Maybe Text
$sel:maxResults:ListApplicationDPUSizes' :: ListApplicationDPUSizes -> 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
]
)
instance Data.ToPath ListApplicationDPUSizes where
toPath :: ListApplicationDPUSizes -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ListApplicationDPUSizes where
toQuery :: ListApplicationDPUSizes -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ListApplicationDPUSizesResponse = ListApplicationDPUSizesResponse'
{
ListApplicationDPUSizesResponse -> Maybe [ApplicationDPUSizes]
applicationDPUSizes :: Prelude.Maybe [ApplicationDPUSizes],
ListApplicationDPUSizesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListApplicationDPUSizesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListApplicationDPUSizesResponse
-> ListApplicationDPUSizesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplicationDPUSizesResponse
-> ListApplicationDPUSizesResponse -> Bool
$c/= :: ListApplicationDPUSizesResponse
-> ListApplicationDPUSizesResponse -> Bool
== :: ListApplicationDPUSizesResponse
-> ListApplicationDPUSizesResponse -> Bool
$c== :: ListApplicationDPUSizesResponse
-> ListApplicationDPUSizesResponse -> Bool
Prelude.Eq, ReadPrec [ListApplicationDPUSizesResponse]
ReadPrec ListApplicationDPUSizesResponse
Int -> ReadS ListApplicationDPUSizesResponse
ReadS [ListApplicationDPUSizesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplicationDPUSizesResponse]
$creadListPrec :: ReadPrec [ListApplicationDPUSizesResponse]
readPrec :: ReadPrec ListApplicationDPUSizesResponse
$creadPrec :: ReadPrec ListApplicationDPUSizesResponse
readList :: ReadS [ListApplicationDPUSizesResponse]
$creadList :: ReadS [ListApplicationDPUSizesResponse]
readsPrec :: Int -> ReadS ListApplicationDPUSizesResponse
$creadsPrec :: Int -> ReadS ListApplicationDPUSizesResponse
Prelude.Read, Int -> ListApplicationDPUSizesResponse -> ShowS
[ListApplicationDPUSizesResponse] -> ShowS
ListApplicationDPUSizesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplicationDPUSizesResponse] -> ShowS
$cshowList :: [ListApplicationDPUSizesResponse] -> ShowS
show :: ListApplicationDPUSizesResponse -> String
$cshow :: ListApplicationDPUSizesResponse -> String
showsPrec :: Int -> ListApplicationDPUSizesResponse -> ShowS
$cshowsPrec :: Int -> ListApplicationDPUSizesResponse -> ShowS
Prelude.Show, forall x.
Rep ListApplicationDPUSizesResponse x
-> ListApplicationDPUSizesResponse
forall x.
ListApplicationDPUSizesResponse
-> Rep ListApplicationDPUSizesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListApplicationDPUSizesResponse x
-> ListApplicationDPUSizesResponse
$cfrom :: forall x.
ListApplicationDPUSizesResponse
-> Rep ListApplicationDPUSizesResponse x
Prelude.Generic)
newListApplicationDPUSizesResponse ::
Prelude.Int ->
ListApplicationDPUSizesResponse
newListApplicationDPUSizesResponse :: Int -> ListApplicationDPUSizesResponse
newListApplicationDPUSizesResponse Int
pHttpStatus_ =
ListApplicationDPUSizesResponse'
{ $sel:applicationDPUSizes:ListApplicationDPUSizesResponse' :: Maybe [ApplicationDPUSizes]
applicationDPUSizes =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListApplicationDPUSizesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListApplicationDPUSizesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listApplicationDPUSizesResponse_applicationDPUSizes :: Lens.Lens' ListApplicationDPUSizesResponse (Prelude.Maybe [ApplicationDPUSizes])
listApplicationDPUSizesResponse_applicationDPUSizes :: Lens' ListApplicationDPUSizesResponse (Maybe [ApplicationDPUSizes])
listApplicationDPUSizesResponse_applicationDPUSizes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationDPUSizesResponse' {Maybe [ApplicationDPUSizes]
applicationDPUSizes :: Maybe [ApplicationDPUSizes]
$sel:applicationDPUSizes:ListApplicationDPUSizesResponse' :: ListApplicationDPUSizesResponse -> Maybe [ApplicationDPUSizes]
applicationDPUSizes} -> Maybe [ApplicationDPUSizes]
applicationDPUSizes) (\s :: ListApplicationDPUSizesResponse
s@ListApplicationDPUSizesResponse' {} Maybe [ApplicationDPUSizes]
a -> ListApplicationDPUSizesResponse
s {$sel:applicationDPUSizes:ListApplicationDPUSizesResponse' :: Maybe [ApplicationDPUSizes]
applicationDPUSizes = Maybe [ApplicationDPUSizes]
a} :: ListApplicationDPUSizesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listApplicationDPUSizesResponse_nextToken :: Lens.Lens' ListApplicationDPUSizesResponse (Prelude.Maybe Prelude.Text)
listApplicationDPUSizesResponse_nextToken :: Lens' ListApplicationDPUSizesResponse (Maybe Text)
listApplicationDPUSizesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationDPUSizesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplicationDPUSizesResponse' :: ListApplicationDPUSizesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplicationDPUSizesResponse
s@ListApplicationDPUSizesResponse' {} Maybe Text
a -> ListApplicationDPUSizesResponse
s {$sel:nextToken:ListApplicationDPUSizesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplicationDPUSizesResponse)
listApplicationDPUSizesResponse_httpStatus :: Lens.Lens' ListApplicationDPUSizesResponse Prelude.Int
listApplicationDPUSizesResponse_httpStatus :: Lens' ListApplicationDPUSizesResponse Int
listApplicationDPUSizesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationDPUSizesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListApplicationDPUSizesResponse' :: ListApplicationDPUSizesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListApplicationDPUSizesResponse
s@ListApplicationDPUSizesResponse' {} Int
a -> ListApplicationDPUSizesResponse
s {$sel:httpStatus:ListApplicationDPUSizesResponse' :: Int
httpStatus = Int
a} :: ListApplicationDPUSizesResponse)
instance
Prelude.NFData
ListApplicationDPUSizesResponse
where
rnf :: ListApplicationDPUSizesResponse -> ()
rnf ListApplicationDPUSizesResponse' {Int
Maybe [ApplicationDPUSizes]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
applicationDPUSizes :: Maybe [ApplicationDPUSizes]
$sel:httpStatus:ListApplicationDPUSizesResponse' :: ListApplicationDPUSizesResponse -> Int
$sel:nextToken:ListApplicationDPUSizesResponse' :: ListApplicationDPUSizesResponse -> Maybe Text
$sel:applicationDPUSizes:ListApplicationDPUSizesResponse' :: ListApplicationDPUSizesResponse -> Maybe [ApplicationDPUSizes]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [ApplicationDPUSizes]
applicationDPUSizes
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 Int
httpStatus