{-# 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.CustomerProfiles.ListAccountIntegrations
(
ListAccountIntegrations (..),
newListAccountIntegrations,
listAccountIntegrations_includeHidden,
listAccountIntegrations_maxResults,
listAccountIntegrations_nextToken,
listAccountIntegrations_uri,
ListAccountIntegrationsResponse (..),
newListAccountIntegrationsResponse,
listAccountIntegrationsResponse_items,
listAccountIntegrationsResponse_nextToken,
listAccountIntegrationsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.CustomerProfiles.Types
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 ListAccountIntegrations = ListAccountIntegrations'
{
ListAccountIntegrations -> Maybe Bool
includeHidden :: Prelude.Maybe Prelude.Bool,
ListAccountIntegrations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListAccountIntegrations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListAccountIntegrations -> Text
uri :: Prelude.Text
}
deriving (ListAccountIntegrations -> ListAccountIntegrations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAccountIntegrations -> ListAccountIntegrations -> Bool
$c/= :: ListAccountIntegrations -> ListAccountIntegrations -> Bool
== :: ListAccountIntegrations -> ListAccountIntegrations -> Bool
$c== :: ListAccountIntegrations -> ListAccountIntegrations -> Bool
Prelude.Eq, ReadPrec [ListAccountIntegrations]
ReadPrec ListAccountIntegrations
Int -> ReadS ListAccountIntegrations
ReadS [ListAccountIntegrations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAccountIntegrations]
$creadListPrec :: ReadPrec [ListAccountIntegrations]
readPrec :: ReadPrec ListAccountIntegrations
$creadPrec :: ReadPrec ListAccountIntegrations
readList :: ReadS [ListAccountIntegrations]
$creadList :: ReadS [ListAccountIntegrations]
readsPrec :: Int -> ReadS ListAccountIntegrations
$creadsPrec :: Int -> ReadS ListAccountIntegrations
Prelude.Read, Int -> ListAccountIntegrations -> ShowS
[ListAccountIntegrations] -> ShowS
ListAccountIntegrations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAccountIntegrations] -> ShowS
$cshowList :: [ListAccountIntegrations] -> ShowS
show :: ListAccountIntegrations -> String
$cshow :: ListAccountIntegrations -> String
showsPrec :: Int -> ListAccountIntegrations -> ShowS
$cshowsPrec :: Int -> ListAccountIntegrations -> ShowS
Prelude.Show, forall x. Rep ListAccountIntegrations x -> ListAccountIntegrations
forall x. ListAccountIntegrations -> Rep ListAccountIntegrations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAccountIntegrations x -> ListAccountIntegrations
$cfrom :: forall x. ListAccountIntegrations -> Rep ListAccountIntegrations x
Prelude.Generic)
newListAccountIntegrations ::
Prelude.Text ->
ListAccountIntegrations
newListAccountIntegrations :: Text -> ListAccountIntegrations
newListAccountIntegrations Text
pUri_ =
ListAccountIntegrations'
{ $sel:includeHidden:ListAccountIntegrations' :: Maybe Bool
includeHidden =
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListAccountIntegrations' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListAccountIntegrations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:uri:ListAccountIntegrations' :: Text
uri = Text
pUri_
}
listAccountIntegrations_includeHidden :: Lens.Lens' ListAccountIntegrations (Prelude.Maybe Prelude.Bool)
listAccountIntegrations_includeHidden :: Lens' ListAccountIntegrations (Maybe Bool)
listAccountIntegrations_includeHidden = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountIntegrations' {Maybe Bool
includeHidden :: Maybe Bool
$sel:includeHidden:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Bool
includeHidden} -> Maybe Bool
includeHidden) (\s :: ListAccountIntegrations
s@ListAccountIntegrations' {} Maybe Bool
a -> ListAccountIntegrations
s {$sel:includeHidden:ListAccountIntegrations' :: Maybe Bool
includeHidden = Maybe Bool
a} :: ListAccountIntegrations)
listAccountIntegrations_maxResults :: Lens.Lens' ListAccountIntegrations (Prelude.Maybe Prelude.Natural)
listAccountIntegrations_maxResults :: Lens' ListAccountIntegrations (Maybe Natural)
listAccountIntegrations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountIntegrations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAccountIntegrations
s@ListAccountIntegrations' {} Maybe Natural
a -> ListAccountIntegrations
s {$sel:maxResults:ListAccountIntegrations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAccountIntegrations)
listAccountIntegrations_nextToken :: Lens.Lens' ListAccountIntegrations (Prelude.Maybe Prelude.Text)
listAccountIntegrations_nextToken :: Lens' ListAccountIntegrations (Maybe Text)
listAccountIntegrations_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountIntegrations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAccountIntegrations
s@ListAccountIntegrations' {} Maybe Text
a -> ListAccountIntegrations
s {$sel:nextToken:ListAccountIntegrations' :: Maybe Text
nextToken = Maybe Text
a} :: ListAccountIntegrations)
listAccountIntegrations_uri :: Lens.Lens' ListAccountIntegrations Prelude.Text
listAccountIntegrations_uri :: Lens' ListAccountIntegrations Text
listAccountIntegrations_uri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountIntegrations' {Text
uri :: Text
$sel:uri:ListAccountIntegrations' :: ListAccountIntegrations -> Text
uri} -> Text
uri) (\s :: ListAccountIntegrations
s@ListAccountIntegrations' {} Text
a -> ListAccountIntegrations
s {$sel:uri:ListAccountIntegrations' :: Text
uri = Text
a} :: ListAccountIntegrations)
instance Core.AWSRequest ListAccountIntegrations where
type
AWSResponse ListAccountIntegrations =
ListAccountIntegrationsResponse
request :: (Service -> Service)
-> ListAccountIntegrations -> Request ListAccountIntegrations
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 ListAccountIntegrations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListAccountIntegrations)))
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 [ListIntegrationItem]
-> Maybe Text -> Int -> ListAccountIntegrationsResponse
ListAccountIntegrationsResponse'
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
"Items" 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 ListAccountIntegrations where
hashWithSalt :: Int -> ListAccountIntegrations -> Int
hashWithSalt Int
_salt ListAccountIntegrations' {Maybe Bool
Maybe Natural
Maybe Text
Text
uri :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
includeHidden :: Maybe Bool
$sel:uri:ListAccountIntegrations' :: ListAccountIntegrations -> Text
$sel:nextToken:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Text
$sel:maxResults:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Natural
$sel:includeHidden:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeHidden
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` Text
uri
instance Prelude.NFData ListAccountIntegrations where
rnf :: ListAccountIntegrations -> ()
rnf ListAccountIntegrations' {Maybe Bool
Maybe Natural
Maybe Text
Text
uri :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
includeHidden :: Maybe Bool
$sel:uri:ListAccountIntegrations' :: ListAccountIntegrations -> Text
$sel:nextToken:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Text
$sel:maxResults:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Natural
$sel:includeHidden:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeHidden
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
uri
instance Data.ToHeaders ListAccountIntegrations where
toHeaders :: ListAccountIntegrations -> 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 ListAccountIntegrations where
toJSON :: ListAccountIntegrations -> Value
toJSON ListAccountIntegrations' {Maybe Bool
Maybe Natural
Maybe Text
Text
uri :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
includeHidden :: Maybe Bool
$sel:uri:ListAccountIntegrations' :: ListAccountIntegrations -> Text
$sel:nextToken:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Text
$sel:maxResults:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Natural
$sel:includeHidden:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"Uri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
uri)]
)
instance Data.ToPath ListAccountIntegrations where
toPath :: ListAccountIntegrations -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/integrations"
instance Data.ToQuery ListAccountIntegrations where
toQuery :: ListAccountIntegrations -> QueryString
toQuery ListAccountIntegrations' {Maybe Bool
Maybe Natural
Maybe Text
Text
uri :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
includeHidden :: Maybe Bool
$sel:uri:ListAccountIntegrations' :: ListAccountIntegrations -> Text
$sel:nextToken:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Text
$sel:maxResults:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Natural
$sel:includeHidden:ListAccountIntegrations' :: ListAccountIntegrations -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"include-hidden" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
includeHidden,
ByteString
"max-results" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
ByteString
"next-token" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
]
data ListAccountIntegrationsResponse = ListAccountIntegrationsResponse'
{
ListAccountIntegrationsResponse -> Maybe [ListIntegrationItem]
items :: Prelude.Maybe [ListIntegrationItem],
ListAccountIntegrationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListAccountIntegrationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListAccountIntegrationsResponse
-> ListAccountIntegrationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAccountIntegrationsResponse
-> ListAccountIntegrationsResponse -> Bool
$c/= :: ListAccountIntegrationsResponse
-> ListAccountIntegrationsResponse -> Bool
== :: ListAccountIntegrationsResponse
-> ListAccountIntegrationsResponse -> Bool
$c== :: ListAccountIntegrationsResponse
-> ListAccountIntegrationsResponse -> Bool
Prelude.Eq, ReadPrec [ListAccountIntegrationsResponse]
ReadPrec ListAccountIntegrationsResponse
Int -> ReadS ListAccountIntegrationsResponse
ReadS [ListAccountIntegrationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAccountIntegrationsResponse]
$creadListPrec :: ReadPrec [ListAccountIntegrationsResponse]
readPrec :: ReadPrec ListAccountIntegrationsResponse
$creadPrec :: ReadPrec ListAccountIntegrationsResponse
readList :: ReadS [ListAccountIntegrationsResponse]
$creadList :: ReadS [ListAccountIntegrationsResponse]
readsPrec :: Int -> ReadS ListAccountIntegrationsResponse
$creadsPrec :: Int -> ReadS ListAccountIntegrationsResponse
Prelude.Read, Int -> ListAccountIntegrationsResponse -> ShowS
[ListAccountIntegrationsResponse] -> ShowS
ListAccountIntegrationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAccountIntegrationsResponse] -> ShowS
$cshowList :: [ListAccountIntegrationsResponse] -> ShowS
show :: ListAccountIntegrationsResponse -> String
$cshow :: ListAccountIntegrationsResponse -> String
showsPrec :: Int -> ListAccountIntegrationsResponse -> ShowS
$cshowsPrec :: Int -> ListAccountIntegrationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListAccountIntegrationsResponse x
-> ListAccountIntegrationsResponse
forall x.
ListAccountIntegrationsResponse
-> Rep ListAccountIntegrationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAccountIntegrationsResponse x
-> ListAccountIntegrationsResponse
$cfrom :: forall x.
ListAccountIntegrationsResponse
-> Rep ListAccountIntegrationsResponse x
Prelude.Generic)
newListAccountIntegrationsResponse ::
Prelude.Int ->
ListAccountIntegrationsResponse
newListAccountIntegrationsResponse :: Int -> ListAccountIntegrationsResponse
newListAccountIntegrationsResponse Int
pHttpStatus_ =
ListAccountIntegrationsResponse'
{ $sel:items:ListAccountIntegrationsResponse' :: Maybe [ListIntegrationItem]
items =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListAccountIntegrationsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListAccountIntegrationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listAccountIntegrationsResponse_items :: Lens.Lens' ListAccountIntegrationsResponse (Prelude.Maybe [ListIntegrationItem])
listAccountIntegrationsResponse_items :: Lens' ListAccountIntegrationsResponse (Maybe [ListIntegrationItem])
listAccountIntegrationsResponse_items = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountIntegrationsResponse' {Maybe [ListIntegrationItem]
items :: Maybe [ListIntegrationItem]
$sel:items:ListAccountIntegrationsResponse' :: ListAccountIntegrationsResponse -> Maybe [ListIntegrationItem]
items} -> Maybe [ListIntegrationItem]
items) (\s :: ListAccountIntegrationsResponse
s@ListAccountIntegrationsResponse' {} Maybe [ListIntegrationItem]
a -> ListAccountIntegrationsResponse
s {$sel:items:ListAccountIntegrationsResponse' :: Maybe [ListIntegrationItem]
items = Maybe [ListIntegrationItem]
a} :: ListAccountIntegrationsResponse) 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
listAccountIntegrationsResponse_nextToken :: Lens.Lens' ListAccountIntegrationsResponse (Prelude.Maybe Prelude.Text)
listAccountIntegrationsResponse_nextToken :: Lens' ListAccountIntegrationsResponse (Maybe Text)
listAccountIntegrationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountIntegrationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAccountIntegrationsResponse' :: ListAccountIntegrationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAccountIntegrationsResponse
s@ListAccountIntegrationsResponse' {} Maybe Text
a -> ListAccountIntegrationsResponse
s {$sel:nextToken:ListAccountIntegrationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAccountIntegrationsResponse)
listAccountIntegrationsResponse_httpStatus :: Lens.Lens' ListAccountIntegrationsResponse Prelude.Int
listAccountIntegrationsResponse_httpStatus :: Lens' ListAccountIntegrationsResponse Int
listAccountIntegrationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountIntegrationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListAccountIntegrationsResponse' :: ListAccountIntegrationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListAccountIntegrationsResponse
s@ListAccountIntegrationsResponse' {} Int
a -> ListAccountIntegrationsResponse
s {$sel:httpStatus:ListAccountIntegrationsResponse' :: Int
httpStatus = Int
a} :: ListAccountIntegrationsResponse)
instance
Prelude.NFData
ListAccountIntegrationsResponse
where
rnf :: ListAccountIntegrationsResponse -> ()
rnf ListAccountIntegrationsResponse' {Int
Maybe [ListIntegrationItem]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
items :: Maybe [ListIntegrationItem]
$sel:httpStatus:ListAccountIntegrationsResponse' :: ListAccountIntegrationsResponse -> Int
$sel:nextToken:ListAccountIntegrationsResponse' :: ListAccountIntegrationsResponse -> Maybe Text
$sel:items:ListAccountIntegrationsResponse' :: ListAccountIntegrationsResponse -> Maybe [ListIntegrationItem]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [ListIntegrationItem]
items
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