{-# 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.ServiceQuotas.ListRequestedServiceQuotaChangeHistory
(
ListRequestedServiceQuotaChangeHistory (..),
newListRequestedServiceQuotaChangeHistory,
listRequestedServiceQuotaChangeHistory_status,
listRequestedServiceQuotaChangeHistory_nextToken,
listRequestedServiceQuotaChangeHistory_serviceCode,
listRequestedServiceQuotaChangeHistory_maxResults,
ListRequestedServiceQuotaChangeHistoryResponse (..),
newListRequestedServiceQuotaChangeHistoryResponse,
listRequestedServiceQuotaChangeHistoryResponse_nextToken,
listRequestedServiceQuotaChangeHistoryResponse_requestedQuotas,
listRequestedServiceQuotaChangeHistoryResponse_httpStatus,
)
where
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
import Amazonka.ServiceQuotas.Types
data ListRequestedServiceQuotaChangeHistory = ListRequestedServiceQuotaChangeHistory'
{
ListRequestedServiceQuotaChangeHistory -> Maybe RequestStatus
status :: Prelude.Maybe RequestStatus,
ListRequestedServiceQuotaChangeHistory -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListRequestedServiceQuotaChangeHistory -> Maybe Text
serviceCode :: Prelude.Maybe Prelude.Text,
ListRequestedServiceQuotaChangeHistory -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListRequestedServiceQuotaChangeHistory
-> ListRequestedServiceQuotaChangeHistory -> Bool
(ListRequestedServiceQuotaChangeHistory
-> ListRequestedServiceQuotaChangeHistory -> Bool)
-> (ListRequestedServiceQuotaChangeHistory
-> ListRequestedServiceQuotaChangeHistory -> Bool)
-> Eq ListRequestedServiceQuotaChangeHistory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRequestedServiceQuotaChangeHistory
-> ListRequestedServiceQuotaChangeHistory -> Bool
$c/= :: ListRequestedServiceQuotaChangeHistory
-> ListRequestedServiceQuotaChangeHistory -> Bool
== :: ListRequestedServiceQuotaChangeHistory
-> ListRequestedServiceQuotaChangeHistory -> Bool
$c== :: ListRequestedServiceQuotaChangeHistory
-> ListRequestedServiceQuotaChangeHistory -> Bool
Prelude.Eq, ReadPrec [ListRequestedServiceQuotaChangeHistory]
ReadPrec ListRequestedServiceQuotaChangeHistory
Int -> ReadS ListRequestedServiceQuotaChangeHistory
ReadS [ListRequestedServiceQuotaChangeHistory]
(Int -> ReadS ListRequestedServiceQuotaChangeHistory)
-> ReadS [ListRequestedServiceQuotaChangeHistory]
-> ReadPrec ListRequestedServiceQuotaChangeHistory
-> ReadPrec [ListRequestedServiceQuotaChangeHistory]
-> Read ListRequestedServiceQuotaChangeHistory
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRequestedServiceQuotaChangeHistory]
$creadListPrec :: ReadPrec [ListRequestedServiceQuotaChangeHistory]
readPrec :: ReadPrec ListRequestedServiceQuotaChangeHistory
$creadPrec :: ReadPrec ListRequestedServiceQuotaChangeHistory
readList :: ReadS [ListRequestedServiceQuotaChangeHistory]
$creadList :: ReadS [ListRequestedServiceQuotaChangeHistory]
readsPrec :: Int -> ReadS ListRequestedServiceQuotaChangeHistory
$creadsPrec :: Int -> ReadS ListRequestedServiceQuotaChangeHistory
Prelude.Read, Int -> ListRequestedServiceQuotaChangeHistory -> ShowS
[ListRequestedServiceQuotaChangeHistory] -> ShowS
ListRequestedServiceQuotaChangeHistory -> String
(Int -> ListRequestedServiceQuotaChangeHistory -> ShowS)
-> (ListRequestedServiceQuotaChangeHistory -> String)
-> ([ListRequestedServiceQuotaChangeHistory] -> ShowS)
-> Show ListRequestedServiceQuotaChangeHistory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRequestedServiceQuotaChangeHistory] -> ShowS
$cshowList :: [ListRequestedServiceQuotaChangeHistory] -> ShowS
show :: ListRequestedServiceQuotaChangeHistory -> String
$cshow :: ListRequestedServiceQuotaChangeHistory -> String
showsPrec :: Int -> ListRequestedServiceQuotaChangeHistory -> ShowS
$cshowsPrec :: Int -> ListRequestedServiceQuotaChangeHistory -> ShowS
Prelude.Show, (forall x.
ListRequestedServiceQuotaChangeHistory
-> Rep ListRequestedServiceQuotaChangeHistory x)
-> (forall x.
Rep ListRequestedServiceQuotaChangeHistory x
-> ListRequestedServiceQuotaChangeHistory)
-> Generic ListRequestedServiceQuotaChangeHistory
forall x.
Rep ListRequestedServiceQuotaChangeHistory x
-> ListRequestedServiceQuotaChangeHistory
forall x.
ListRequestedServiceQuotaChangeHistory
-> Rep ListRequestedServiceQuotaChangeHistory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRequestedServiceQuotaChangeHistory x
-> ListRequestedServiceQuotaChangeHistory
$cfrom :: forall x.
ListRequestedServiceQuotaChangeHistory
-> Rep ListRequestedServiceQuotaChangeHistory x
Prelude.Generic)
newListRequestedServiceQuotaChangeHistory ::
ListRequestedServiceQuotaChangeHistory
newListRequestedServiceQuotaChangeHistory :: ListRequestedServiceQuotaChangeHistory
newListRequestedServiceQuotaChangeHistory =
ListRequestedServiceQuotaChangeHistory' :: Maybe RequestStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> ListRequestedServiceQuotaChangeHistory
ListRequestedServiceQuotaChangeHistory'
{ $sel:status:ListRequestedServiceQuotaChangeHistory' :: Maybe RequestStatus
status =
Maybe RequestStatus
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListRequestedServiceQuotaChangeHistory' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceCode:ListRequestedServiceQuotaChangeHistory' :: Maybe Text
serviceCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListRequestedServiceQuotaChangeHistory' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listRequestedServiceQuotaChangeHistory_status :: Lens.Lens' ListRequestedServiceQuotaChangeHistory (Prelude.Maybe RequestStatus)
listRequestedServiceQuotaChangeHistory_status :: (Maybe RequestStatus -> f (Maybe RequestStatus))
-> ListRequestedServiceQuotaChangeHistory
-> f ListRequestedServiceQuotaChangeHistory
listRequestedServiceQuotaChangeHistory_status = (ListRequestedServiceQuotaChangeHistory -> Maybe RequestStatus)
-> (ListRequestedServiceQuotaChangeHistory
-> Maybe RequestStatus -> ListRequestedServiceQuotaChangeHistory)
-> Lens
ListRequestedServiceQuotaChangeHistory
ListRequestedServiceQuotaChangeHistory
(Maybe RequestStatus)
(Maybe RequestStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRequestedServiceQuotaChangeHistory' {Maybe RequestStatus
status :: Maybe RequestStatus
$sel:status:ListRequestedServiceQuotaChangeHistory' :: ListRequestedServiceQuotaChangeHistory -> Maybe RequestStatus
status} -> Maybe RequestStatus
status) (\s :: ListRequestedServiceQuotaChangeHistory
s@ListRequestedServiceQuotaChangeHistory' {} Maybe RequestStatus
a -> ListRequestedServiceQuotaChangeHistory
s {$sel:status:ListRequestedServiceQuotaChangeHistory' :: Maybe RequestStatus
status = Maybe RequestStatus
a} :: ListRequestedServiceQuotaChangeHistory)
listRequestedServiceQuotaChangeHistory_nextToken :: Lens.Lens' ListRequestedServiceQuotaChangeHistory (Prelude.Maybe Prelude.Text)
listRequestedServiceQuotaChangeHistory_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRequestedServiceQuotaChangeHistory
-> f ListRequestedServiceQuotaChangeHistory
listRequestedServiceQuotaChangeHistory_nextToken = (ListRequestedServiceQuotaChangeHistory -> Maybe Text)
-> (ListRequestedServiceQuotaChangeHistory
-> Maybe Text -> ListRequestedServiceQuotaChangeHistory)
-> Lens
ListRequestedServiceQuotaChangeHistory
ListRequestedServiceQuotaChangeHistory
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRequestedServiceQuotaChangeHistory' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRequestedServiceQuotaChangeHistory' :: ListRequestedServiceQuotaChangeHistory -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRequestedServiceQuotaChangeHistory
s@ListRequestedServiceQuotaChangeHistory' {} Maybe Text
a -> ListRequestedServiceQuotaChangeHistory
s {$sel:nextToken:ListRequestedServiceQuotaChangeHistory' :: Maybe Text
nextToken = Maybe Text
a} :: ListRequestedServiceQuotaChangeHistory)
listRequestedServiceQuotaChangeHistory_serviceCode :: Lens.Lens' ListRequestedServiceQuotaChangeHistory (Prelude.Maybe Prelude.Text)
listRequestedServiceQuotaChangeHistory_serviceCode :: (Maybe Text -> f (Maybe Text))
-> ListRequestedServiceQuotaChangeHistory
-> f ListRequestedServiceQuotaChangeHistory
listRequestedServiceQuotaChangeHistory_serviceCode = (ListRequestedServiceQuotaChangeHistory -> Maybe Text)
-> (ListRequestedServiceQuotaChangeHistory
-> Maybe Text -> ListRequestedServiceQuotaChangeHistory)
-> Lens
ListRequestedServiceQuotaChangeHistory
ListRequestedServiceQuotaChangeHistory
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRequestedServiceQuotaChangeHistory' {Maybe Text
serviceCode :: Maybe Text
$sel:serviceCode:ListRequestedServiceQuotaChangeHistory' :: ListRequestedServiceQuotaChangeHistory -> Maybe Text
serviceCode} -> Maybe Text
serviceCode) (\s :: ListRequestedServiceQuotaChangeHistory
s@ListRequestedServiceQuotaChangeHistory' {} Maybe Text
a -> ListRequestedServiceQuotaChangeHistory
s {$sel:serviceCode:ListRequestedServiceQuotaChangeHistory' :: Maybe Text
serviceCode = Maybe Text
a} :: ListRequestedServiceQuotaChangeHistory)
listRequestedServiceQuotaChangeHistory_maxResults :: Lens.Lens' ListRequestedServiceQuotaChangeHistory (Prelude.Maybe Prelude.Natural)
listRequestedServiceQuotaChangeHistory_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListRequestedServiceQuotaChangeHistory
-> f ListRequestedServiceQuotaChangeHistory
listRequestedServiceQuotaChangeHistory_maxResults = (ListRequestedServiceQuotaChangeHistory -> Maybe Natural)
-> (ListRequestedServiceQuotaChangeHistory
-> Maybe Natural -> ListRequestedServiceQuotaChangeHistory)
-> Lens
ListRequestedServiceQuotaChangeHistory
ListRequestedServiceQuotaChangeHistory
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRequestedServiceQuotaChangeHistory' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListRequestedServiceQuotaChangeHistory' :: ListRequestedServiceQuotaChangeHistory -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListRequestedServiceQuotaChangeHistory
s@ListRequestedServiceQuotaChangeHistory' {} Maybe Natural
a -> ListRequestedServiceQuotaChangeHistory
s {$sel:maxResults:ListRequestedServiceQuotaChangeHistory' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListRequestedServiceQuotaChangeHistory)
instance
Core.AWSPager
ListRequestedServiceQuotaChangeHistory
where
page :: ListRequestedServiceQuotaChangeHistory
-> AWSResponse ListRequestedServiceQuotaChangeHistory
-> Maybe ListRequestedServiceQuotaChangeHistory
page ListRequestedServiceQuotaChangeHistory
rq AWSResponse ListRequestedServiceQuotaChangeHistory
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListRequestedServiceQuotaChangeHistory
ListRequestedServiceQuotaChangeHistoryResponse
rs
ListRequestedServiceQuotaChangeHistoryResponse
-> Getting
(First Text) ListRequestedServiceQuotaChangeHistoryResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRequestedServiceQuotaChangeHistoryResponse
-> Const
(First Text) ListRequestedServiceQuotaChangeHistoryResponse
Lens' ListRequestedServiceQuotaChangeHistoryResponse (Maybe Text)
listRequestedServiceQuotaChangeHistoryResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListRequestedServiceQuotaChangeHistoryResponse
-> Const
(First Text) ListRequestedServiceQuotaChangeHistoryResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) ListRequestedServiceQuotaChangeHistoryResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListRequestedServiceQuotaChangeHistory
forall a. Maybe a
Prelude.Nothing
| Maybe [RequestedServiceQuotaChange] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListRequestedServiceQuotaChangeHistory
ListRequestedServiceQuotaChangeHistoryResponse
rs
ListRequestedServiceQuotaChangeHistoryResponse
-> Getting
(First [RequestedServiceQuotaChange])
ListRequestedServiceQuotaChangeHistoryResponse
[RequestedServiceQuotaChange]
-> Maybe [RequestedServiceQuotaChange]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [RequestedServiceQuotaChange]
-> Const
(First [RequestedServiceQuotaChange])
(Maybe [RequestedServiceQuotaChange]))
-> ListRequestedServiceQuotaChangeHistoryResponse
-> Const
(First [RequestedServiceQuotaChange])
ListRequestedServiceQuotaChangeHistoryResponse
Lens'
ListRequestedServiceQuotaChangeHistoryResponse
(Maybe [RequestedServiceQuotaChange])
listRequestedServiceQuotaChangeHistoryResponse_requestedQuotas
((Maybe [RequestedServiceQuotaChange]
-> Const
(First [RequestedServiceQuotaChange])
(Maybe [RequestedServiceQuotaChange]))
-> ListRequestedServiceQuotaChangeHistoryResponse
-> Const
(First [RequestedServiceQuotaChange])
ListRequestedServiceQuotaChangeHistoryResponse)
-> (([RequestedServiceQuotaChange]
-> Const
(First [RequestedServiceQuotaChange])
[RequestedServiceQuotaChange])
-> Maybe [RequestedServiceQuotaChange]
-> Const
(First [RequestedServiceQuotaChange])
(Maybe [RequestedServiceQuotaChange]))
-> Getting
(First [RequestedServiceQuotaChange])
ListRequestedServiceQuotaChangeHistoryResponse
[RequestedServiceQuotaChange]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([RequestedServiceQuotaChange]
-> Const
(First [RequestedServiceQuotaChange])
[RequestedServiceQuotaChange])
-> Maybe [RequestedServiceQuotaChange]
-> Const
(First [RequestedServiceQuotaChange])
(Maybe [RequestedServiceQuotaChange])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListRequestedServiceQuotaChangeHistory
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListRequestedServiceQuotaChangeHistory
-> Maybe ListRequestedServiceQuotaChangeHistory
forall a. a -> Maybe a
Prelude.Just (ListRequestedServiceQuotaChangeHistory
-> Maybe ListRequestedServiceQuotaChangeHistory)
-> ListRequestedServiceQuotaChangeHistory
-> Maybe ListRequestedServiceQuotaChangeHistory
forall a b. (a -> b) -> a -> b
Prelude.$
ListRequestedServiceQuotaChangeHistory
rq
ListRequestedServiceQuotaChangeHistory
-> (ListRequestedServiceQuotaChangeHistory
-> ListRequestedServiceQuotaChangeHistory)
-> ListRequestedServiceQuotaChangeHistory
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListRequestedServiceQuotaChangeHistory
-> Identity ListRequestedServiceQuotaChangeHistory
Lens
ListRequestedServiceQuotaChangeHistory
ListRequestedServiceQuotaChangeHistory
(Maybe Text)
(Maybe Text)
listRequestedServiceQuotaChangeHistory_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListRequestedServiceQuotaChangeHistory
-> Identity ListRequestedServiceQuotaChangeHistory)
-> Maybe Text
-> ListRequestedServiceQuotaChangeHistory
-> ListRequestedServiceQuotaChangeHistory
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListRequestedServiceQuotaChangeHistory
ListRequestedServiceQuotaChangeHistoryResponse
rs
ListRequestedServiceQuotaChangeHistoryResponse
-> Getting
(First Text) ListRequestedServiceQuotaChangeHistoryResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRequestedServiceQuotaChangeHistoryResponse
-> Const
(First Text) ListRequestedServiceQuotaChangeHistoryResponse
Lens' ListRequestedServiceQuotaChangeHistoryResponse (Maybe Text)
listRequestedServiceQuotaChangeHistoryResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListRequestedServiceQuotaChangeHistoryResponse
-> Const
(First Text) ListRequestedServiceQuotaChangeHistoryResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) ListRequestedServiceQuotaChangeHistoryResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance
Core.AWSRequest
ListRequestedServiceQuotaChangeHistory
where
type
AWSResponse
ListRequestedServiceQuotaChangeHistory =
ListRequestedServiceQuotaChangeHistoryResponse
request :: ListRequestedServiceQuotaChangeHistory
-> Request ListRequestedServiceQuotaChangeHistory
request = Service
-> ListRequestedServiceQuotaChangeHistory
-> Request ListRequestedServiceQuotaChangeHistory
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListRequestedServiceQuotaChangeHistory
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ListRequestedServiceQuotaChangeHistory)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse ListRequestedServiceQuotaChangeHistory))
-> Logger
-> Service
-> Proxy ListRequestedServiceQuotaChangeHistory
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ListRequestedServiceQuotaChangeHistory)))
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 Text
-> Maybe [RequestedServiceQuotaChange]
-> Int
-> ListRequestedServiceQuotaChangeHistoryResponse
ListRequestedServiceQuotaChangeHistoryResponse'
(Maybe Text
-> Maybe [RequestedServiceQuotaChange]
-> Int
-> ListRequestedServiceQuotaChangeHistoryResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [RequestedServiceQuotaChange]
-> Int -> ListRequestedServiceQuotaChangeHistoryResponse)
forall (f :: * -> *) a b. Functor 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
(Maybe [RequestedServiceQuotaChange]
-> Int -> ListRequestedServiceQuotaChangeHistoryResponse)
-> Either String (Maybe [RequestedServiceQuotaChange])
-> Either
String (Int -> ListRequestedServiceQuotaChangeHistoryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [RequestedServiceQuotaChange]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RequestedQuotas"
Either String (Maybe (Maybe [RequestedServiceQuotaChange]))
-> Maybe [RequestedServiceQuotaChange]
-> Either String (Maybe [RequestedServiceQuotaChange])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [RequestedServiceQuotaChange]
forall a. Monoid a => a
Prelude.mempty
)
Either
String (Int -> ListRequestedServiceQuotaChangeHistoryResponse)
-> Either String Int
-> Either String ListRequestedServiceQuotaChangeHistoryResponse
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
ListRequestedServiceQuotaChangeHistory
instance
Prelude.NFData
ListRequestedServiceQuotaChangeHistory
instance
Core.ToHeaders
ListRequestedServiceQuotaChangeHistory
where
toHeaders :: ListRequestedServiceQuotaChangeHistory -> ResponseHeaders
toHeaders =
ResponseHeaders
-> ListRequestedServiceQuotaChangeHistory -> 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
"ServiceQuotasV20190624.ListRequestedServiceQuotaChangeHistory" ::
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
ListRequestedServiceQuotaChangeHistory
where
toJSON :: ListRequestedServiceQuotaChangeHistory -> Value
toJSON ListRequestedServiceQuotaChangeHistory' {Maybe Natural
Maybe Text
Maybe RequestStatus
maxResults :: Maybe Natural
serviceCode :: Maybe Text
nextToken :: Maybe Text
status :: Maybe RequestStatus
$sel:maxResults:ListRequestedServiceQuotaChangeHistory' :: ListRequestedServiceQuotaChangeHistory -> Maybe Natural
$sel:serviceCode:ListRequestedServiceQuotaChangeHistory' :: ListRequestedServiceQuotaChangeHistory -> Maybe Text
$sel:nextToken:ListRequestedServiceQuotaChangeHistory' :: ListRequestedServiceQuotaChangeHistory -> Maybe Text
$sel:status:ListRequestedServiceQuotaChangeHistory' :: ListRequestedServiceQuotaChangeHistory -> Maybe RequestStatus
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Status" Text -> RequestStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RequestStatus -> Pair) -> Maybe RequestStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RequestStatus
status,
(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
"ServiceCode" 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
serviceCode,
(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
]
)
instance
Core.ToPath
ListRequestedServiceQuotaChangeHistory
where
toPath :: ListRequestedServiceQuotaChangeHistory -> ByteString
toPath = ByteString -> ListRequestedServiceQuotaChangeHistory -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
ListRequestedServiceQuotaChangeHistory
where
toQuery :: ListRequestedServiceQuotaChangeHistory -> QueryString
toQuery = QueryString
-> ListRequestedServiceQuotaChangeHistory -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListRequestedServiceQuotaChangeHistoryResponse = ListRequestedServiceQuotaChangeHistoryResponse'
{
ListRequestedServiceQuotaChangeHistoryResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListRequestedServiceQuotaChangeHistoryResponse
-> Maybe [RequestedServiceQuotaChange]
requestedQuotas :: Prelude.Maybe [RequestedServiceQuotaChange],
ListRequestedServiceQuotaChangeHistoryResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListRequestedServiceQuotaChangeHistoryResponse
-> ListRequestedServiceQuotaChangeHistoryResponse -> Bool
(ListRequestedServiceQuotaChangeHistoryResponse
-> ListRequestedServiceQuotaChangeHistoryResponse -> Bool)
-> (ListRequestedServiceQuotaChangeHistoryResponse
-> ListRequestedServiceQuotaChangeHistoryResponse -> Bool)
-> Eq ListRequestedServiceQuotaChangeHistoryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRequestedServiceQuotaChangeHistoryResponse
-> ListRequestedServiceQuotaChangeHistoryResponse -> Bool
$c/= :: ListRequestedServiceQuotaChangeHistoryResponse
-> ListRequestedServiceQuotaChangeHistoryResponse -> Bool
== :: ListRequestedServiceQuotaChangeHistoryResponse
-> ListRequestedServiceQuotaChangeHistoryResponse -> Bool
$c== :: ListRequestedServiceQuotaChangeHistoryResponse
-> ListRequestedServiceQuotaChangeHistoryResponse -> Bool
Prelude.Eq, ReadPrec [ListRequestedServiceQuotaChangeHistoryResponse]
ReadPrec ListRequestedServiceQuotaChangeHistoryResponse
Int -> ReadS ListRequestedServiceQuotaChangeHistoryResponse
ReadS [ListRequestedServiceQuotaChangeHistoryResponse]
(Int -> ReadS ListRequestedServiceQuotaChangeHistoryResponse)
-> ReadS [ListRequestedServiceQuotaChangeHistoryResponse]
-> ReadPrec ListRequestedServiceQuotaChangeHistoryResponse
-> ReadPrec [ListRequestedServiceQuotaChangeHistoryResponse]
-> Read ListRequestedServiceQuotaChangeHistoryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRequestedServiceQuotaChangeHistoryResponse]
$creadListPrec :: ReadPrec [ListRequestedServiceQuotaChangeHistoryResponse]
readPrec :: ReadPrec ListRequestedServiceQuotaChangeHistoryResponse
$creadPrec :: ReadPrec ListRequestedServiceQuotaChangeHistoryResponse
readList :: ReadS [ListRequestedServiceQuotaChangeHistoryResponse]
$creadList :: ReadS [ListRequestedServiceQuotaChangeHistoryResponse]
readsPrec :: Int -> ReadS ListRequestedServiceQuotaChangeHistoryResponse
$creadsPrec :: Int -> ReadS ListRequestedServiceQuotaChangeHistoryResponse
Prelude.Read, Int -> ListRequestedServiceQuotaChangeHistoryResponse -> ShowS
[ListRequestedServiceQuotaChangeHistoryResponse] -> ShowS
ListRequestedServiceQuotaChangeHistoryResponse -> String
(Int -> ListRequestedServiceQuotaChangeHistoryResponse -> ShowS)
-> (ListRequestedServiceQuotaChangeHistoryResponse -> String)
-> ([ListRequestedServiceQuotaChangeHistoryResponse] -> ShowS)
-> Show ListRequestedServiceQuotaChangeHistoryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRequestedServiceQuotaChangeHistoryResponse] -> ShowS
$cshowList :: [ListRequestedServiceQuotaChangeHistoryResponse] -> ShowS
show :: ListRequestedServiceQuotaChangeHistoryResponse -> String
$cshow :: ListRequestedServiceQuotaChangeHistoryResponse -> String
showsPrec :: Int -> ListRequestedServiceQuotaChangeHistoryResponse -> ShowS
$cshowsPrec :: Int -> ListRequestedServiceQuotaChangeHistoryResponse -> ShowS
Prelude.Show, (forall x.
ListRequestedServiceQuotaChangeHistoryResponse
-> Rep ListRequestedServiceQuotaChangeHistoryResponse x)
-> (forall x.
Rep ListRequestedServiceQuotaChangeHistoryResponse x
-> ListRequestedServiceQuotaChangeHistoryResponse)
-> Generic ListRequestedServiceQuotaChangeHistoryResponse
forall x.
Rep ListRequestedServiceQuotaChangeHistoryResponse x
-> ListRequestedServiceQuotaChangeHistoryResponse
forall x.
ListRequestedServiceQuotaChangeHistoryResponse
-> Rep ListRequestedServiceQuotaChangeHistoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRequestedServiceQuotaChangeHistoryResponse x
-> ListRequestedServiceQuotaChangeHistoryResponse
$cfrom :: forall x.
ListRequestedServiceQuotaChangeHistoryResponse
-> Rep ListRequestedServiceQuotaChangeHistoryResponse x
Prelude.Generic)
newListRequestedServiceQuotaChangeHistoryResponse ::
Prelude.Int ->
ListRequestedServiceQuotaChangeHistoryResponse
newListRequestedServiceQuotaChangeHistoryResponse :: Int -> ListRequestedServiceQuotaChangeHistoryResponse
newListRequestedServiceQuotaChangeHistoryResponse
Int
pHttpStatus_ =
ListRequestedServiceQuotaChangeHistoryResponse' :: Maybe Text
-> Maybe [RequestedServiceQuotaChange]
-> Int
-> ListRequestedServiceQuotaChangeHistoryResponse
ListRequestedServiceQuotaChangeHistoryResponse'
{ $sel:nextToken:ListRequestedServiceQuotaChangeHistoryResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requestedQuotas:ListRequestedServiceQuotaChangeHistoryResponse' :: Maybe [RequestedServiceQuotaChange]
requestedQuotas =
Maybe [RequestedServiceQuotaChange]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListRequestedServiceQuotaChangeHistoryResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listRequestedServiceQuotaChangeHistoryResponse_nextToken :: Lens.Lens' ListRequestedServiceQuotaChangeHistoryResponse (Prelude.Maybe Prelude.Text)
listRequestedServiceQuotaChangeHistoryResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRequestedServiceQuotaChangeHistoryResponse
-> f ListRequestedServiceQuotaChangeHistoryResponse
listRequestedServiceQuotaChangeHistoryResponse_nextToken = (ListRequestedServiceQuotaChangeHistoryResponse -> Maybe Text)
-> (ListRequestedServiceQuotaChangeHistoryResponse
-> Maybe Text -> ListRequestedServiceQuotaChangeHistoryResponse)
-> Lens'
ListRequestedServiceQuotaChangeHistoryResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRequestedServiceQuotaChangeHistoryResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRequestedServiceQuotaChangeHistoryResponse' :: ListRequestedServiceQuotaChangeHistoryResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRequestedServiceQuotaChangeHistoryResponse
s@ListRequestedServiceQuotaChangeHistoryResponse' {} Maybe Text
a -> ListRequestedServiceQuotaChangeHistoryResponse
s {$sel:nextToken:ListRequestedServiceQuotaChangeHistoryResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRequestedServiceQuotaChangeHistoryResponse)
listRequestedServiceQuotaChangeHistoryResponse_requestedQuotas :: Lens.Lens' ListRequestedServiceQuotaChangeHistoryResponse (Prelude.Maybe [RequestedServiceQuotaChange])
listRequestedServiceQuotaChangeHistoryResponse_requestedQuotas :: (Maybe [RequestedServiceQuotaChange]
-> f (Maybe [RequestedServiceQuotaChange]))
-> ListRequestedServiceQuotaChangeHistoryResponse
-> f ListRequestedServiceQuotaChangeHistoryResponse
listRequestedServiceQuotaChangeHistoryResponse_requestedQuotas = (ListRequestedServiceQuotaChangeHistoryResponse
-> Maybe [RequestedServiceQuotaChange])
-> (ListRequestedServiceQuotaChangeHistoryResponse
-> Maybe [RequestedServiceQuotaChange]
-> ListRequestedServiceQuotaChangeHistoryResponse)
-> Lens'
ListRequestedServiceQuotaChangeHistoryResponse
(Maybe [RequestedServiceQuotaChange])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRequestedServiceQuotaChangeHistoryResponse' {Maybe [RequestedServiceQuotaChange]
requestedQuotas :: Maybe [RequestedServiceQuotaChange]
$sel:requestedQuotas:ListRequestedServiceQuotaChangeHistoryResponse' :: ListRequestedServiceQuotaChangeHistoryResponse
-> Maybe [RequestedServiceQuotaChange]
requestedQuotas} -> Maybe [RequestedServiceQuotaChange]
requestedQuotas) (\s :: ListRequestedServiceQuotaChangeHistoryResponse
s@ListRequestedServiceQuotaChangeHistoryResponse' {} Maybe [RequestedServiceQuotaChange]
a -> ListRequestedServiceQuotaChangeHistoryResponse
s {$sel:requestedQuotas:ListRequestedServiceQuotaChangeHistoryResponse' :: Maybe [RequestedServiceQuotaChange]
requestedQuotas = Maybe [RequestedServiceQuotaChange]
a} :: ListRequestedServiceQuotaChangeHistoryResponse) ((Maybe [RequestedServiceQuotaChange]
-> f (Maybe [RequestedServiceQuotaChange]))
-> ListRequestedServiceQuotaChangeHistoryResponse
-> f ListRequestedServiceQuotaChangeHistoryResponse)
-> ((Maybe [RequestedServiceQuotaChange]
-> f (Maybe [RequestedServiceQuotaChange]))
-> Maybe [RequestedServiceQuotaChange]
-> f (Maybe [RequestedServiceQuotaChange]))
-> (Maybe [RequestedServiceQuotaChange]
-> f (Maybe [RequestedServiceQuotaChange]))
-> ListRequestedServiceQuotaChangeHistoryResponse
-> f ListRequestedServiceQuotaChangeHistoryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[RequestedServiceQuotaChange]
[RequestedServiceQuotaChange]
[RequestedServiceQuotaChange]
[RequestedServiceQuotaChange]
-> Iso
(Maybe [RequestedServiceQuotaChange])
(Maybe [RequestedServiceQuotaChange])
(Maybe [RequestedServiceQuotaChange])
(Maybe [RequestedServiceQuotaChange])
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
[RequestedServiceQuotaChange]
[RequestedServiceQuotaChange]
[RequestedServiceQuotaChange]
[RequestedServiceQuotaChange]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listRequestedServiceQuotaChangeHistoryResponse_httpStatus :: Lens.Lens' ListRequestedServiceQuotaChangeHistoryResponse Prelude.Int
listRequestedServiceQuotaChangeHistoryResponse_httpStatus :: (Int -> f Int)
-> ListRequestedServiceQuotaChangeHistoryResponse
-> f ListRequestedServiceQuotaChangeHistoryResponse
listRequestedServiceQuotaChangeHistoryResponse_httpStatus = (ListRequestedServiceQuotaChangeHistoryResponse -> Int)
-> (ListRequestedServiceQuotaChangeHistoryResponse
-> Int -> ListRequestedServiceQuotaChangeHistoryResponse)
-> Lens
ListRequestedServiceQuotaChangeHistoryResponse
ListRequestedServiceQuotaChangeHistoryResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRequestedServiceQuotaChangeHistoryResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListRequestedServiceQuotaChangeHistoryResponse' :: ListRequestedServiceQuotaChangeHistoryResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListRequestedServiceQuotaChangeHistoryResponse
s@ListRequestedServiceQuotaChangeHistoryResponse' {} Int
a -> ListRequestedServiceQuotaChangeHistoryResponse
s {$sel:httpStatus:ListRequestedServiceQuotaChangeHistoryResponse' :: Int
httpStatus = Int
a} :: ListRequestedServiceQuotaChangeHistoryResponse)
instance
Prelude.NFData
ListRequestedServiceQuotaChangeHistoryResponse