{-# 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.AppIntegrationS.ListDataIntegrations
(
ListDataIntegrations (..),
newListDataIntegrations,
listDataIntegrations_nextToken,
listDataIntegrations_maxResults,
ListDataIntegrationsResponse (..),
newListDataIntegrationsResponse,
listDataIntegrationsResponse_dataIntegrations,
listDataIntegrationsResponse_nextToken,
listDataIntegrationsResponse_httpStatus,
)
where
import Amazonka.AppIntegrationS.Types
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
data ListDataIntegrations = ListDataIntegrations'
{
ListDataIntegrations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListDataIntegrations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListDataIntegrations -> ListDataIntegrations -> Bool
(ListDataIntegrations -> ListDataIntegrations -> Bool)
-> (ListDataIntegrations -> ListDataIntegrations -> Bool)
-> Eq ListDataIntegrations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDataIntegrations -> ListDataIntegrations -> Bool
$c/= :: ListDataIntegrations -> ListDataIntegrations -> Bool
== :: ListDataIntegrations -> ListDataIntegrations -> Bool
$c== :: ListDataIntegrations -> ListDataIntegrations -> Bool
Prelude.Eq, ReadPrec [ListDataIntegrations]
ReadPrec ListDataIntegrations
Int -> ReadS ListDataIntegrations
ReadS [ListDataIntegrations]
(Int -> ReadS ListDataIntegrations)
-> ReadS [ListDataIntegrations]
-> ReadPrec ListDataIntegrations
-> ReadPrec [ListDataIntegrations]
-> Read ListDataIntegrations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDataIntegrations]
$creadListPrec :: ReadPrec [ListDataIntegrations]
readPrec :: ReadPrec ListDataIntegrations
$creadPrec :: ReadPrec ListDataIntegrations
readList :: ReadS [ListDataIntegrations]
$creadList :: ReadS [ListDataIntegrations]
readsPrec :: Int -> ReadS ListDataIntegrations
$creadsPrec :: Int -> ReadS ListDataIntegrations
Prelude.Read, Int -> ListDataIntegrations -> ShowS
[ListDataIntegrations] -> ShowS
ListDataIntegrations -> String
(Int -> ListDataIntegrations -> ShowS)
-> (ListDataIntegrations -> String)
-> ([ListDataIntegrations] -> ShowS)
-> Show ListDataIntegrations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDataIntegrations] -> ShowS
$cshowList :: [ListDataIntegrations] -> ShowS
show :: ListDataIntegrations -> String
$cshow :: ListDataIntegrations -> String
showsPrec :: Int -> ListDataIntegrations -> ShowS
$cshowsPrec :: Int -> ListDataIntegrations -> ShowS
Prelude.Show, (forall x. ListDataIntegrations -> Rep ListDataIntegrations x)
-> (forall x. Rep ListDataIntegrations x -> ListDataIntegrations)
-> Generic ListDataIntegrations
forall x. Rep ListDataIntegrations x -> ListDataIntegrations
forall x. ListDataIntegrations -> Rep ListDataIntegrations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDataIntegrations x -> ListDataIntegrations
$cfrom :: forall x. ListDataIntegrations -> Rep ListDataIntegrations x
Prelude.Generic)
newListDataIntegrations ::
ListDataIntegrations
newListDataIntegrations :: ListDataIntegrations
newListDataIntegrations =
ListDataIntegrations' :: Maybe Text -> Maybe Natural -> ListDataIntegrations
ListDataIntegrations'
{ $sel:nextToken:ListDataIntegrations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListDataIntegrations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listDataIntegrations_nextToken :: Lens.Lens' ListDataIntegrations (Prelude.Maybe Prelude.Text)
listDataIntegrations_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDataIntegrations -> f ListDataIntegrations
listDataIntegrations_nextToken = (ListDataIntegrations -> Maybe Text)
-> (ListDataIntegrations -> Maybe Text -> ListDataIntegrations)
-> Lens
ListDataIntegrations ListDataIntegrations (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataIntegrations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDataIntegrations' :: ListDataIntegrations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDataIntegrations
s@ListDataIntegrations' {} Maybe Text
a -> ListDataIntegrations
s {$sel:nextToken:ListDataIntegrations' :: Maybe Text
nextToken = Maybe Text
a} :: ListDataIntegrations)
listDataIntegrations_maxResults :: Lens.Lens' ListDataIntegrations (Prelude.Maybe Prelude.Natural)
listDataIntegrations_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListDataIntegrations -> f ListDataIntegrations
listDataIntegrations_maxResults = (ListDataIntegrations -> Maybe Natural)
-> (ListDataIntegrations -> Maybe Natural -> ListDataIntegrations)
-> Lens
ListDataIntegrations
ListDataIntegrations
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataIntegrations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDataIntegrations' :: ListDataIntegrations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDataIntegrations
s@ListDataIntegrations' {} Maybe Natural
a -> ListDataIntegrations
s {$sel:maxResults:ListDataIntegrations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDataIntegrations)
instance Core.AWSRequest ListDataIntegrations where
type
AWSResponse ListDataIntegrations =
ListDataIntegrationsResponse
request :: ListDataIntegrations -> Request ListDataIntegrations
request = Service -> ListDataIntegrations -> Request ListDataIntegrations
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListDataIntegrations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListDataIntegrations)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListDataIntegrations))
-> Logger
-> Service
-> Proxy ListDataIntegrations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListDataIntegrations)))
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 (NonEmpty DataIntegrationSummary)
-> Maybe Text -> Int -> ListDataIntegrationsResponse
ListDataIntegrationsResponse'
(Maybe (NonEmpty DataIntegrationSummary)
-> Maybe Text -> Int -> ListDataIntegrationsResponse)
-> Either String (Maybe (NonEmpty DataIntegrationSummary))
-> Either
String (Maybe Text -> Int -> ListDataIntegrationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe (NonEmpty DataIntegrationSummary))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataIntegrations")
Either String (Maybe Text -> Int -> ListDataIntegrationsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListDataIntegrationsResponse)
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
"NextToken")
Either String (Int -> ListDataIntegrationsResponse)
-> Either String Int -> Either String ListDataIntegrationsResponse
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 ListDataIntegrations
instance Prelude.NFData ListDataIntegrations
instance Core.ToHeaders ListDataIntegrations where
toHeaders :: ListDataIntegrations -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListDataIntegrations -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath ListDataIntegrations where
toPath :: ListDataIntegrations -> ByteString
toPath = ByteString -> ListDataIntegrations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/dataIntegrations"
instance Core.ToQuery ListDataIntegrations where
toQuery :: ListDataIntegrations -> QueryString
toQuery ListDataIntegrations' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListDataIntegrations' :: ListDataIntegrations -> Maybe Natural
$sel:nextToken:ListDataIntegrations' :: ListDataIntegrations -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
]
data ListDataIntegrationsResponse = ListDataIntegrationsResponse'
{
ListDataIntegrationsResponse
-> Maybe (NonEmpty DataIntegrationSummary)
dataIntegrations :: Prelude.Maybe (Prelude.NonEmpty DataIntegrationSummary),
ListDataIntegrationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListDataIntegrationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListDataIntegrationsResponse
-> ListDataIntegrationsResponse -> Bool
(ListDataIntegrationsResponse
-> ListDataIntegrationsResponse -> Bool)
-> (ListDataIntegrationsResponse
-> ListDataIntegrationsResponse -> Bool)
-> Eq ListDataIntegrationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDataIntegrationsResponse
-> ListDataIntegrationsResponse -> Bool
$c/= :: ListDataIntegrationsResponse
-> ListDataIntegrationsResponse -> Bool
== :: ListDataIntegrationsResponse
-> ListDataIntegrationsResponse -> Bool
$c== :: ListDataIntegrationsResponse
-> ListDataIntegrationsResponse -> Bool
Prelude.Eq, ReadPrec [ListDataIntegrationsResponse]
ReadPrec ListDataIntegrationsResponse
Int -> ReadS ListDataIntegrationsResponse
ReadS [ListDataIntegrationsResponse]
(Int -> ReadS ListDataIntegrationsResponse)
-> ReadS [ListDataIntegrationsResponse]
-> ReadPrec ListDataIntegrationsResponse
-> ReadPrec [ListDataIntegrationsResponse]
-> Read ListDataIntegrationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDataIntegrationsResponse]
$creadListPrec :: ReadPrec [ListDataIntegrationsResponse]
readPrec :: ReadPrec ListDataIntegrationsResponse
$creadPrec :: ReadPrec ListDataIntegrationsResponse
readList :: ReadS [ListDataIntegrationsResponse]
$creadList :: ReadS [ListDataIntegrationsResponse]
readsPrec :: Int -> ReadS ListDataIntegrationsResponse
$creadsPrec :: Int -> ReadS ListDataIntegrationsResponse
Prelude.Read, Int -> ListDataIntegrationsResponse -> ShowS
[ListDataIntegrationsResponse] -> ShowS
ListDataIntegrationsResponse -> String
(Int -> ListDataIntegrationsResponse -> ShowS)
-> (ListDataIntegrationsResponse -> String)
-> ([ListDataIntegrationsResponse] -> ShowS)
-> Show ListDataIntegrationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDataIntegrationsResponse] -> ShowS
$cshowList :: [ListDataIntegrationsResponse] -> ShowS
show :: ListDataIntegrationsResponse -> String
$cshow :: ListDataIntegrationsResponse -> String
showsPrec :: Int -> ListDataIntegrationsResponse -> ShowS
$cshowsPrec :: Int -> ListDataIntegrationsResponse -> ShowS
Prelude.Show, (forall x.
ListDataIntegrationsResponse -> Rep ListDataIntegrationsResponse x)
-> (forall x.
Rep ListDataIntegrationsResponse x -> ListDataIntegrationsResponse)
-> Generic ListDataIntegrationsResponse
forall x.
Rep ListDataIntegrationsResponse x -> ListDataIntegrationsResponse
forall x.
ListDataIntegrationsResponse -> Rep ListDataIntegrationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDataIntegrationsResponse x -> ListDataIntegrationsResponse
$cfrom :: forall x.
ListDataIntegrationsResponse -> Rep ListDataIntegrationsResponse x
Prelude.Generic)
newListDataIntegrationsResponse ::
Prelude.Int ->
ListDataIntegrationsResponse
newListDataIntegrationsResponse :: Int -> ListDataIntegrationsResponse
newListDataIntegrationsResponse Int
pHttpStatus_ =
ListDataIntegrationsResponse' :: Maybe (NonEmpty DataIntegrationSummary)
-> Maybe Text -> Int -> ListDataIntegrationsResponse
ListDataIntegrationsResponse'
{ $sel:dataIntegrations:ListDataIntegrationsResponse' :: Maybe (NonEmpty DataIntegrationSummary)
dataIntegrations =
Maybe (NonEmpty DataIntegrationSummary)
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListDataIntegrationsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListDataIntegrationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listDataIntegrationsResponse_dataIntegrations :: Lens.Lens' ListDataIntegrationsResponse (Prelude.Maybe (Prelude.NonEmpty DataIntegrationSummary))
listDataIntegrationsResponse_dataIntegrations :: (Maybe (NonEmpty DataIntegrationSummary)
-> f (Maybe (NonEmpty DataIntegrationSummary)))
-> ListDataIntegrationsResponse -> f ListDataIntegrationsResponse
listDataIntegrationsResponse_dataIntegrations = (ListDataIntegrationsResponse
-> Maybe (NonEmpty DataIntegrationSummary))
-> (ListDataIntegrationsResponse
-> Maybe (NonEmpty DataIntegrationSummary)
-> ListDataIntegrationsResponse)
-> Lens
ListDataIntegrationsResponse
ListDataIntegrationsResponse
(Maybe (NonEmpty DataIntegrationSummary))
(Maybe (NonEmpty DataIntegrationSummary))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataIntegrationsResponse' {Maybe (NonEmpty DataIntegrationSummary)
dataIntegrations :: Maybe (NonEmpty DataIntegrationSummary)
$sel:dataIntegrations:ListDataIntegrationsResponse' :: ListDataIntegrationsResponse
-> Maybe (NonEmpty DataIntegrationSummary)
dataIntegrations} -> Maybe (NonEmpty DataIntegrationSummary)
dataIntegrations) (\s :: ListDataIntegrationsResponse
s@ListDataIntegrationsResponse' {} Maybe (NonEmpty DataIntegrationSummary)
a -> ListDataIntegrationsResponse
s {$sel:dataIntegrations:ListDataIntegrationsResponse' :: Maybe (NonEmpty DataIntegrationSummary)
dataIntegrations = Maybe (NonEmpty DataIntegrationSummary)
a} :: ListDataIntegrationsResponse) ((Maybe (NonEmpty DataIntegrationSummary)
-> f (Maybe (NonEmpty DataIntegrationSummary)))
-> ListDataIntegrationsResponse -> f ListDataIntegrationsResponse)
-> ((Maybe (NonEmpty DataIntegrationSummary)
-> f (Maybe (NonEmpty DataIntegrationSummary)))
-> Maybe (NonEmpty DataIntegrationSummary)
-> f (Maybe (NonEmpty DataIntegrationSummary)))
-> (Maybe (NonEmpty DataIntegrationSummary)
-> f (Maybe (NonEmpty DataIntegrationSummary)))
-> ListDataIntegrationsResponse
-> f ListDataIntegrationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty DataIntegrationSummary)
(NonEmpty DataIntegrationSummary)
(NonEmpty DataIntegrationSummary)
(NonEmpty DataIntegrationSummary)
-> Iso
(Maybe (NonEmpty DataIntegrationSummary))
(Maybe (NonEmpty DataIntegrationSummary))
(Maybe (NonEmpty DataIntegrationSummary))
(Maybe (NonEmpty DataIntegrationSummary))
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
(NonEmpty DataIntegrationSummary)
(NonEmpty DataIntegrationSummary)
(NonEmpty DataIntegrationSummary)
(NonEmpty DataIntegrationSummary)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listDataIntegrationsResponse_nextToken :: Lens.Lens' ListDataIntegrationsResponse (Prelude.Maybe Prelude.Text)
listDataIntegrationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDataIntegrationsResponse -> f ListDataIntegrationsResponse
listDataIntegrationsResponse_nextToken = (ListDataIntegrationsResponse -> Maybe Text)
-> (ListDataIntegrationsResponse
-> Maybe Text -> ListDataIntegrationsResponse)
-> Lens
ListDataIntegrationsResponse
ListDataIntegrationsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataIntegrationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDataIntegrationsResponse' :: ListDataIntegrationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDataIntegrationsResponse
s@ListDataIntegrationsResponse' {} Maybe Text
a -> ListDataIntegrationsResponse
s {$sel:nextToken:ListDataIntegrationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDataIntegrationsResponse)
listDataIntegrationsResponse_httpStatus :: Lens.Lens' ListDataIntegrationsResponse Prelude.Int
listDataIntegrationsResponse_httpStatus :: (Int -> f Int)
-> ListDataIntegrationsResponse -> f ListDataIntegrationsResponse
listDataIntegrationsResponse_httpStatus = (ListDataIntegrationsResponse -> Int)
-> (ListDataIntegrationsResponse
-> Int -> ListDataIntegrationsResponse)
-> Lens
ListDataIntegrationsResponse ListDataIntegrationsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataIntegrationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListDataIntegrationsResponse' :: ListDataIntegrationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListDataIntegrationsResponse
s@ListDataIntegrationsResponse' {} Int
a -> ListDataIntegrationsResponse
s {$sel:httpStatus:ListDataIntegrationsResponse' :: Int
httpStatus = Int
a} :: ListDataIntegrationsResponse)
instance Prelude.NFData ListDataIntegrationsResponse