{-# 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.DMS.DescribeAccountAttributes
(
DescribeAccountAttributes (..),
newDescribeAccountAttributes,
DescribeAccountAttributesResponse (..),
newDescribeAccountAttributesResponse,
describeAccountAttributesResponse_accountQuotas,
describeAccountAttributesResponse_uniqueAccountIdentifier,
describeAccountAttributesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DMS.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 DescribeAccountAttributes = DescribeAccountAttributes'
{
}
deriving (DescribeAccountAttributes -> DescribeAccountAttributes -> Bool
(DescribeAccountAttributes -> DescribeAccountAttributes -> Bool)
-> (DescribeAccountAttributes -> DescribeAccountAttributes -> Bool)
-> Eq DescribeAccountAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAccountAttributes -> DescribeAccountAttributes -> Bool
$c/= :: DescribeAccountAttributes -> DescribeAccountAttributes -> Bool
== :: DescribeAccountAttributes -> DescribeAccountAttributes -> Bool
$c== :: DescribeAccountAttributes -> DescribeAccountAttributes -> Bool
Prelude.Eq, ReadPrec [DescribeAccountAttributes]
ReadPrec DescribeAccountAttributes
Int -> ReadS DescribeAccountAttributes
ReadS [DescribeAccountAttributes]
(Int -> ReadS DescribeAccountAttributes)
-> ReadS [DescribeAccountAttributes]
-> ReadPrec DescribeAccountAttributes
-> ReadPrec [DescribeAccountAttributes]
-> Read DescribeAccountAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAccountAttributes]
$creadListPrec :: ReadPrec [DescribeAccountAttributes]
readPrec :: ReadPrec DescribeAccountAttributes
$creadPrec :: ReadPrec DescribeAccountAttributes
readList :: ReadS [DescribeAccountAttributes]
$creadList :: ReadS [DescribeAccountAttributes]
readsPrec :: Int -> ReadS DescribeAccountAttributes
$creadsPrec :: Int -> ReadS DescribeAccountAttributes
Prelude.Read, Int -> DescribeAccountAttributes -> ShowS
[DescribeAccountAttributes] -> ShowS
DescribeAccountAttributes -> String
(Int -> DescribeAccountAttributes -> ShowS)
-> (DescribeAccountAttributes -> String)
-> ([DescribeAccountAttributes] -> ShowS)
-> Show DescribeAccountAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAccountAttributes] -> ShowS
$cshowList :: [DescribeAccountAttributes] -> ShowS
show :: DescribeAccountAttributes -> String
$cshow :: DescribeAccountAttributes -> String
showsPrec :: Int -> DescribeAccountAttributes -> ShowS
$cshowsPrec :: Int -> DescribeAccountAttributes -> ShowS
Prelude.Show, (forall x.
DescribeAccountAttributes -> Rep DescribeAccountAttributes x)
-> (forall x.
Rep DescribeAccountAttributes x -> DescribeAccountAttributes)
-> Generic DescribeAccountAttributes
forall x.
Rep DescribeAccountAttributes x -> DescribeAccountAttributes
forall x.
DescribeAccountAttributes -> Rep DescribeAccountAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAccountAttributes x -> DescribeAccountAttributes
$cfrom :: forall x.
DescribeAccountAttributes -> Rep DescribeAccountAttributes x
Prelude.Generic)
newDescribeAccountAttributes ::
DescribeAccountAttributes
newDescribeAccountAttributes :: DescribeAccountAttributes
newDescribeAccountAttributes =
DescribeAccountAttributes
DescribeAccountAttributes'
instance Core.AWSRequest DescribeAccountAttributes where
type
AWSResponse DescribeAccountAttributes =
DescribeAccountAttributesResponse
request :: DescribeAccountAttributes -> Request DescribeAccountAttributes
request = Service
-> DescribeAccountAttributes -> Request DescribeAccountAttributes
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeAccountAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAccountAttributes)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeAccountAttributes))
-> Logger
-> Service
-> Proxy DescribeAccountAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAccountAttributes)))
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 [AccountQuota]
-> Maybe Text -> Int -> DescribeAccountAttributesResponse
DescribeAccountAttributesResponse'
(Maybe [AccountQuota]
-> Maybe Text -> Int -> DescribeAccountAttributesResponse)
-> Either String (Maybe [AccountQuota])
-> Either
String (Maybe Text -> Int -> DescribeAccountAttributesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [AccountQuota]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AccountQuotas" Either String (Maybe (Maybe [AccountQuota]))
-> Maybe [AccountQuota] -> Either String (Maybe [AccountQuota])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AccountQuota]
forall a. Monoid a => a
Prelude.mempty)
Either
String (Maybe Text -> Int -> DescribeAccountAttributesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeAccountAttributesResponse)
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
"UniqueAccountIdentifier")
Either String (Int -> DescribeAccountAttributesResponse)
-> Either String Int
-> Either String DescribeAccountAttributesResponse
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 DescribeAccountAttributes
instance Prelude.NFData DescribeAccountAttributes
instance Core.ToHeaders DescribeAccountAttributes where
toHeaders :: DescribeAccountAttributes -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeAccountAttributes -> 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
"AmazonDMSv20160101.DescribeAccountAttributes" ::
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 DescribeAccountAttributes where
toJSON :: DescribeAccountAttributes -> Value
toJSON = Value -> DescribeAccountAttributes -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance Core.ToPath DescribeAccountAttributes where
toPath :: DescribeAccountAttributes -> ByteString
toPath = ByteString -> DescribeAccountAttributes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeAccountAttributes where
toQuery :: DescribeAccountAttributes -> QueryString
toQuery = QueryString -> DescribeAccountAttributes -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeAccountAttributesResponse = DescribeAccountAttributesResponse'
{
DescribeAccountAttributesResponse -> Maybe [AccountQuota]
accountQuotas :: Prelude.Maybe [AccountQuota],
DescribeAccountAttributesResponse -> Maybe Text
uniqueAccountIdentifier :: Prelude.Maybe Prelude.Text,
DescribeAccountAttributesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeAccountAttributesResponse
-> DescribeAccountAttributesResponse -> Bool
(DescribeAccountAttributesResponse
-> DescribeAccountAttributesResponse -> Bool)
-> (DescribeAccountAttributesResponse
-> DescribeAccountAttributesResponse -> Bool)
-> Eq DescribeAccountAttributesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAccountAttributesResponse
-> DescribeAccountAttributesResponse -> Bool
$c/= :: DescribeAccountAttributesResponse
-> DescribeAccountAttributesResponse -> Bool
== :: DescribeAccountAttributesResponse
-> DescribeAccountAttributesResponse -> Bool
$c== :: DescribeAccountAttributesResponse
-> DescribeAccountAttributesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAccountAttributesResponse]
ReadPrec DescribeAccountAttributesResponse
Int -> ReadS DescribeAccountAttributesResponse
ReadS [DescribeAccountAttributesResponse]
(Int -> ReadS DescribeAccountAttributesResponse)
-> ReadS [DescribeAccountAttributesResponse]
-> ReadPrec DescribeAccountAttributesResponse
-> ReadPrec [DescribeAccountAttributesResponse]
-> Read DescribeAccountAttributesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAccountAttributesResponse]
$creadListPrec :: ReadPrec [DescribeAccountAttributesResponse]
readPrec :: ReadPrec DescribeAccountAttributesResponse
$creadPrec :: ReadPrec DescribeAccountAttributesResponse
readList :: ReadS [DescribeAccountAttributesResponse]
$creadList :: ReadS [DescribeAccountAttributesResponse]
readsPrec :: Int -> ReadS DescribeAccountAttributesResponse
$creadsPrec :: Int -> ReadS DescribeAccountAttributesResponse
Prelude.Read, Int -> DescribeAccountAttributesResponse -> ShowS
[DescribeAccountAttributesResponse] -> ShowS
DescribeAccountAttributesResponse -> String
(Int -> DescribeAccountAttributesResponse -> ShowS)
-> (DescribeAccountAttributesResponse -> String)
-> ([DescribeAccountAttributesResponse] -> ShowS)
-> Show DescribeAccountAttributesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAccountAttributesResponse] -> ShowS
$cshowList :: [DescribeAccountAttributesResponse] -> ShowS
show :: DescribeAccountAttributesResponse -> String
$cshow :: DescribeAccountAttributesResponse -> String
showsPrec :: Int -> DescribeAccountAttributesResponse -> ShowS
$cshowsPrec :: Int -> DescribeAccountAttributesResponse -> ShowS
Prelude.Show, (forall x.
DescribeAccountAttributesResponse
-> Rep DescribeAccountAttributesResponse x)
-> (forall x.
Rep DescribeAccountAttributesResponse x
-> DescribeAccountAttributesResponse)
-> Generic DescribeAccountAttributesResponse
forall x.
Rep DescribeAccountAttributesResponse x
-> DescribeAccountAttributesResponse
forall x.
DescribeAccountAttributesResponse
-> Rep DescribeAccountAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAccountAttributesResponse x
-> DescribeAccountAttributesResponse
$cfrom :: forall x.
DescribeAccountAttributesResponse
-> Rep DescribeAccountAttributesResponse x
Prelude.Generic)
newDescribeAccountAttributesResponse ::
Prelude.Int ->
DescribeAccountAttributesResponse
newDescribeAccountAttributesResponse :: Int -> DescribeAccountAttributesResponse
newDescribeAccountAttributesResponse Int
pHttpStatus_ =
DescribeAccountAttributesResponse' :: Maybe [AccountQuota]
-> Maybe Text -> Int -> DescribeAccountAttributesResponse
DescribeAccountAttributesResponse'
{ $sel:accountQuotas:DescribeAccountAttributesResponse' :: Maybe [AccountQuota]
accountQuotas =
Maybe [AccountQuota]
forall a. Maybe a
Prelude.Nothing,
$sel:uniqueAccountIdentifier:DescribeAccountAttributesResponse' :: Maybe Text
uniqueAccountIdentifier =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAccountAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAccountAttributesResponse_accountQuotas :: Lens.Lens' DescribeAccountAttributesResponse (Prelude.Maybe [AccountQuota])
describeAccountAttributesResponse_accountQuotas :: (Maybe [AccountQuota] -> f (Maybe [AccountQuota]))
-> DescribeAccountAttributesResponse
-> f DescribeAccountAttributesResponse
describeAccountAttributesResponse_accountQuotas = (DescribeAccountAttributesResponse -> Maybe [AccountQuota])
-> (DescribeAccountAttributesResponse
-> Maybe [AccountQuota] -> DescribeAccountAttributesResponse)
-> Lens
DescribeAccountAttributesResponse
DescribeAccountAttributesResponse
(Maybe [AccountQuota])
(Maybe [AccountQuota])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountAttributesResponse' {Maybe [AccountQuota]
accountQuotas :: Maybe [AccountQuota]
$sel:accountQuotas:DescribeAccountAttributesResponse' :: DescribeAccountAttributesResponse -> Maybe [AccountQuota]
accountQuotas} -> Maybe [AccountQuota]
accountQuotas) (\s :: DescribeAccountAttributesResponse
s@DescribeAccountAttributesResponse' {} Maybe [AccountQuota]
a -> DescribeAccountAttributesResponse
s {$sel:accountQuotas:DescribeAccountAttributesResponse' :: Maybe [AccountQuota]
accountQuotas = Maybe [AccountQuota]
a} :: DescribeAccountAttributesResponse) ((Maybe [AccountQuota] -> f (Maybe [AccountQuota]))
-> DescribeAccountAttributesResponse
-> f DescribeAccountAttributesResponse)
-> ((Maybe [AccountQuota] -> f (Maybe [AccountQuota]))
-> Maybe [AccountQuota] -> f (Maybe [AccountQuota]))
-> (Maybe [AccountQuota] -> f (Maybe [AccountQuota]))
-> DescribeAccountAttributesResponse
-> f DescribeAccountAttributesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AccountQuota] [AccountQuota] [AccountQuota] [AccountQuota]
-> Iso
(Maybe [AccountQuota])
(Maybe [AccountQuota])
(Maybe [AccountQuota])
(Maybe [AccountQuota])
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 [AccountQuota] [AccountQuota] [AccountQuota] [AccountQuota]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeAccountAttributesResponse_uniqueAccountIdentifier :: Lens.Lens' DescribeAccountAttributesResponse (Prelude.Maybe Prelude.Text)
describeAccountAttributesResponse_uniqueAccountIdentifier :: (Maybe Text -> f (Maybe Text))
-> DescribeAccountAttributesResponse
-> f DescribeAccountAttributesResponse
describeAccountAttributesResponse_uniqueAccountIdentifier = (DescribeAccountAttributesResponse -> Maybe Text)
-> (DescribeAccountAttributesResponse
-> Maybe Text -> DescribeAccountAttributesResponse)
-> Lens
DescribeAccountAttributesResponse
DescribeAccountAttributesResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountAttributesResponse' {Maybe Text
uniqueAccountIdentifier :: Maybe Text
$sel:uniqueAccountIdentifier:DescribeAccountAttributesResponse' :: DescribeAccountAttributesResponse -> Maybe Text
uniqueAccountIdentifier} -> Maybe Text
uniqueAccountIdentifier) (\s :: DescribeAccountAttributesResponse
s@DescribeAccountAttributesResponse' {} Maybe Text
a -> DescribeAccountAttributesResponse
s {$sel:uniqueAccountIdentifier:DescribeAccountAttributesResponse' :: Maybe Text
uniqueAccountIdentifier = Maybe Text
a} :: DescribeAccountAttributesResponse)
describeAccountAttributesResponse_httpStatus :: Lens.Lens' DescribeAccountAttributesResponse Prelude.Int
describeAccountAttributesResponse_httpStatus :: (Int -> f Int)
-> DescribeAccountAttributesResponse
-> f DescribeAccountAttributesResponse
describeAccountAttributesResponse_httpStatus = (DescribeAccountAttributesResponse -> Int)
-> (DescribeAccountAttributesResponse
-> Int -> DescribeAccountAttributesResponse)
-> Lens
DescribeAccountAttributesResponse
DescribeAccountAttributesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountAttributesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAccountAttributesResponse' :: DescribeAccountAttributesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAccountAttributesResponse
s@DescribeAccountAttributesResponse' {} Int
a -> DescribeAccountAttributesResponse
s {$sel:httpStatus:DescribeAccountAttributesResponse' :: Int
httpStatus = Int
a} :: DescribeAccountAttributesResponse)
instance
Prelude.NFData
DescribeAccountAttributesResponse