{-# 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.ListIntegrations
(
ListIntegrations (..),
newListIntegrations,
listIntegrations_includeHidden,
listIntegrations_maxResults,
listIntegrations_nextToken,
listIntegrations_domainName,
ListIntegrationsResponse (..),
newListIntegrationsResponse,
listIntegrationsResponse_items,
listIntegrationsResponse_nextToken,
listIntegrationsResponse_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 ListIntegrations = ListIntegrations'
{
ListIntegrations -> Maybe Bool
includeHidden :: Prelude.Maybe Prelude.Bool,
ListIntegrations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListIntegrations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListIntegrations -> Text
domainName :: Prelude.Text
}
deriving (ListIntegrations -> ListIntegrations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIntegrations -> ListIntegrations -> Bool
$c/= :: ListIntegrations -> ListIntegrations -> Bool
== :: ListIntegrations -> ListIntegrations -> Bool
$c== :: ListIntegrations -> ListIntegrations -> Bool
Prelude.Eq, ReadPrec [ListIntegrations]
ReadPrec ListIntegrations
Int -> ReadS ListIntegrations
ReadS [ListIntegrations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIntegrations]
$creadListPrec :: ReadPrec [ListIntegrations]
readPrec :: ReadPrec ListIntegrations
$creadPrec :: ReadPrec ListIntegrations
readList :: ReadS [ListIntegrations]
$creadList :: ReadS [ListIntegrations]
readsPrec :: Int -> ReadS ListIntegrations
$creadsPrec :: Int -> ReadS ListIntegrations
Prelude.Read, Int -> ListIntegrations -> ShowS
[ListIntegrations] -> ShowS
ListIntegrations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIntegrations] -> ShowS
$cshowList :: [ListIntegrations] -> ShowS
show :: ListIntegrations -> String
$cshow :: ListIntegrations -> String
showsPrec :: Int -> ListIntegrations -> ShowS
$cshowsPrec :: Int -> ListIntegrations -> ShowS
Prelude.Show, forall x. Rep ListIntegrations x -> ListIntegrations
forall x. ListIntegrations -> Rep ListIntegrations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListIntegrations x -> ListIntegrations
$cfrom :: forall x. ListIntegrations -> Rep ListIntegrations x
Prelude.Generic)
newListIntegrations ::
Prelude.Text ->
ListIntegrations
newListIntegrations :: Text -> ListIntegrations
newListIntegrations Text
pDomainName_ =
ListIntegrations'
{ $sel:includeHidden:ListIntegrations' :: Maybe Bool
includeHidden = forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListIntegrations' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListIntegrations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:domainName:ListIntegrations' :: Text
domainName = Text
pDomainName_
}
listIntegrations_includeHidden :: Lens.Lens' ListIntegrations (Prelude.Maybe Prelude.Bool)
listIntegrations_includeHidden :: Lens' ListIntegrations (Maybe Bool)
listIntegrations_includeHidden = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIntegrations' {Maybe Bool
includeHidden :: Maybe Bool
$sel:includeHidden:ListIntegrations' :: ListIntegrations -> Maybe Bool
includeHidden} -> Maybe Bool
includeHidden) (\s :: ListIntegrations
s@ListIntegrations' {} Maybe Bool
a -> ListIntegrations
s {$sel:includeHidden:ListIntegrations' :: Maybe Bool
includeHidden = Maybe Bool
a} :: ListIntegrations)
listIntegrations_maxResults :: Lens.Lens' ListIntegrations (Prelude.Maybe Prelude.Natural)
listIntegrations_maxResults :: Lens' ListIntegrations (Maybe Natural)
listIntegrations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIntegrations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListIntegrations' :: ListIntegrations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListIntegrations
s@ListIntegrations' {} Maybe Natural
a -> ListIntegrations
s {$sel:maxResults:ListIntegrations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListIntegrations)
listIntegrations_nextToken :: Lens.Lens' ListIntegrations (Prelude.Maybe Prelude.Text)
listIntegrations_nextToken :: Lens' ListIntegrations (Maybe Text)
listIntegrations_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIntegrations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIntegrations' :: ListIntegrations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIntegrations
s@ListIntegrations' {} Maybe Text
a -> ListIntegrations
s {$sel:nextToken:ListIntegrations' :: Maybe Text
nextToken = Maybe Text
a} :: ListIntegrations)
listIntegrations_domainName :: Lens.Lens' ListIntegrations Prelude.Text
listIntegrations_domainName :: Lens' ListIntegrations Text
listIntegrations_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIntegrations' {Text
domainName :: Text
$sel:domainName:ListIntegrations' :: ListIntegrations -> Text
domainName} -> Text
domainName) (\s :: ListIntegrations
s@ListIntegrations' {} Text
a -> ListIntegrations
s {$sel:domainName:ListIntegrations' :: Text
domainName = Text
a} :: ListIntegrations)
instance Core.AWSRequest ListIntegrations where
type
AWSResponse ListIntegrations =
ListIntegrationsResponse
request :: (Service -> Service)
-> ListIntegrations -> Request ListIntegrations
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListIntegrations
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListIntegrations)))
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 -> ListIntegrationsResponse
ListIntegrationsResponse'
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 ListIntegrations where
hashWithSalt :: Int -> ListIntegrations -> Int
hashWithSalt Int
_salt ListIntegrations' {Maybe Bool
Maybe Natural
Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
includeHidden :: Maybe Bool
$sel:domainName:ListIntegrations' :: ListIntegrations -> Text
$sel:nextToken:ListIntegrations' :: ListIntegrations -> Maybe Text
$sel:maxResults:ListIntegrations' :: ListIntegrations -> Maybe Natural
$sel:includeHidden:ListIntegrations' :: ListIntegrations -> 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
domainName
instance Prelude.NFData ListIntegrations where
rnf :: ListIntegrations -> ()
rnf ListIntegrations' {Maybe Bool
Maybe Natural
Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
includeHidden :: Maybe Bool
$sel:domainName:ListIntegrations' :: ListIntegrations -> Text
$sel:nextToken:ListIntegrations' :: ListIntegrations -> Maybe Text
$sel:maxResults:ListIntegrations' :: ListIntegrations -> Maybe Natural
$sel:includeHidden:ListIntegrations' :: ListIntegrations -> 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
domainName
instance Data.ToHeaders ListIntegrations where
toHeaders :: ListIntegrations -> 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.ToPath ListIntegrations where
toPath :: ListIntegrations -> ByteString
toPath ListIntegrations' {Maybe Bool
Maybe Natural
Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
includeHidden :: Maybe Bool
$sel:domainName:ListIntegrations' :: ListIntegrations -> Text
$sel:nextToken:ListIntegrations' :: ListIntegrations -> Maybe Text
$sel:maxResults:ListIntegrations' :: ListIntegrations -> Maybe Natural
$sel:includeHidden:ListIntegrations' :: ListIntegrations -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/domains/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
domainName, ByteString
"/integrations"]
instance Data.ToQuery ListIntegrations where
toQuery :: ListIntegrations -> QueryString
toQuery ListIntegrations' {Maybe Bool
Maybe Natural
Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
includeHidden :: Maybe Bool
$sel:domainName:ListIntegrations' :: ListIntegrations -> Text
$sel:nextToken:ListIntegrations' :: ListIntegrations -> Maybe Text
$sel:maxResults:ListIntegrations' :: ListIntegrations -> Maybe Natural
$sel:includeHidden:ListIntegrations' :: ListIntegrations -> 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 ListIntegrationsResponse = ListIntegrationsResponse'
{
ListIntegrationsResponse -> Maybe [ListIntegrationItem]
items :: Prelude.Maybe [ListIntegrationItem],
ListIntegrationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListIntegrationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListIntegrationsResponse -> ListIntegrationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIntegrationsResponse -> ListIntegrationsResponse -> Bool
$c/= :: ListIntegrationsResponse -> ListIntegrationsResponse -> Bool
== :: ListIntegrationsResponse -> ListIntegrationsResponse -> Bool
$c== :: ListIntegrationsResponse -> ListIntegrationsResponse -> Bool
Prelude.Eq, ReadPrec [ListIntegrationsResponse]
ReadPrec ListIntegrationsResponse
Int -> ReadS ListIntegrationsResponse
ReadS [ListIntegrationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIntegrationsResponse]
$creadListPrec :: ReadPrec [ListIntegrationsResponse]
readPrec :: ReadPrec ListIntegrationsResponse
$creadPrec :: ReadPrec ListIntegrationsResponse
readList :: ReadS [ListIntegrationsResponse]
$creadList :: ReadS [ListIntegrationsResponse]
readsPrec :: Int -> ReadS ListIntegrationsResponse
$creadsPrec :: Int -> ReadS ListIntegrationsResponse
Prelude.Read, Int -> ListIntegrationsResponse -> ShowS
[ListIntegrationsResponse] -> ShowS
ListIntegrationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIntegrationsResponse] -> ShowS
$cshowList :: [ListIntegrationsResponse] -> ShowS
show :: ListIntegrationsResponse -> String
$cshow :: ListIntegrationsResponse -> String
showsPrec :: Int -> ListIntegrationsResponse -> ShowS
$cshowsPrec :: Int -> ListIntegrationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListIntegrationsResponse x -> ListIntegrationsResponse
forall x.
ListIntegrationsResponse -> Rep ListIntegrationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListIntegrationsResponse x -> ListIntegrationsResponse
$cfrom :: forall x.
ListIntegrationsResponse -> Rep ListIntegrationsResponse x
Prelude.Generic)
newListIntegrationsResponse ::
Prelude.Int ->
ListIntegrationsResponse
newListIntegrationsResponse :: Int -> ListIntegrationsResponse
newListIntegrationsResponse Int
pHttpStatus_ =
ListIntegrationsResponse'
{ $sel:items:ListIntegrationsResponse' :: Maybe [ListIntegrationItem]
items = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListIntegrationsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListIntegrationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listIntegrationsResponse_items :: Lens.Lens' ListIntegrationsResponse (Prelude.Maybe [ListIntegrationItem])
listIntegrationsResponse_items :: Lens' ListIntegrationsResponse (Maybe [ListIntegrationItem])
listIntegrationsResponse_items = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIntegrationsResponse' {Maybe [ListIntegrationItem]
items :: Maybe [ListIntegrationItem]
$sel:items:ListIntegrationsResponse' :: ListIntegrationsResponse -> Maybe [ListIntegrationItem]
items} -> Maybe [ListIntegrationItem]
items) (\s :: ListIntegrationsResponse
s@ListIntegrationsResponse' {} Maybe [ListIntegrationItem]
a -> ListIntegrationsResponse
s {$sel:items:ListIntegrationsResponse' :: Maybe [ListIntegrationItem]
items = Maybe [ListIntegrationItem]
a} :: ListIntegrationsResponse) 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
listIntegrationsResponse_nextToken :: Lens.Lens' ListIntegrationsResponse (Prelude.Maybe Prelude.Text)
listIntegrationsResponse_nextToken :: Lens' ListIntegrationsResponse (Maybe Text)
listIntegrationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIntegrationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIntegrationsResponse' :: ListIntegrationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIntegrationsResponse
s@ListIntegrationsResponse' {} Maybe Text
a -> ListIntegrationsResponse
s {$sel:nextToken:ListIntegrationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListIntegrationsResponse)
listIntegrationsResponse_httpStatus :: Lens.Lens' ListIntegrationsResponse Prelude.Int
listIntegrationsResponse_httpStatus :: Lens' ListIntegrationsResponse Int
listIntegrationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIntegrationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListIntegrationsResponse' :: ListIntegrationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListIntegrationsResponse
s@ListIntegrationsResponse' {} Int
a -> ListIntegrationsResponse
s {$sel:httpStatus:ListIntegrationsResponse' :: Int
httpStatus = Int
a} :: ListIntegrationsResponse)
instance Prelude.NFData ListIntegrationsResponse where
rnf :: ListIntegrationsResponse -> ()
rnf ListIntegrationsResponse' {Int
Maybe [ListIntegrationItem]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
items :: Maybe [ListIntegrationItem]
$sel:httpStatus:ListIntegrationsResponse' :: ListIntegrationsResponse -> Int
$sel:nextToken:ListIntegrationsResponse' :: ListIntegrationsResponse -> Maybe Text
$sel:items:ListIntegrationsResponse' :: ListIntegrationsResponse -> 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