{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AppIntegrationS.ListDataIntegrationAssociations
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a paginated list of DataIntegration associations in the account.
--
-- You cannot create a DataIntegration association for a DataIntegration
-- that has been previously associated. Use a different DataIntegration, or
-- recreate the DataIntegration using the
-- <https://docs.aws.amazon.com/appintegrations/latest/APIReference/API_CreateDataIntegration.html CreateDataIntegration>
-- API.
module Amazonka.AppIntegrationS.ListDataIntegrationAssociations
  ( -- * Creating a Request
    ListDataIntegrationAssociations (..),
    newListDataIntegrationAssociations,

    -- * Request Lenses
    listDataIntegrationAssociations_nextToken,
    listDataIntegrationAssociations_maxResults,
    listDataIntegrationAssociations_dataIntegrationIdentifier,

    -- * Destructuring the Response
    ListDataIntegrationAssociationsResponse (..),
    newListDataIntegrationAssociationsResponse,

    -- * Response Lenses
    listDataIntegrationAssociationsResponse_dataIntegrationAssociations,
    listDataIntegrationAssociationsResponse_nextToken,
    listDataIntegrationAssociationsResponse_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

-- | /See:/ 'newListDataIntegrationAssociations' smart constructor.
data ListDataIntegrationAssociations = ListDataIntegrationAssociations'
  { -- | The token for the next set of results. Use the value returned in the
    -- previous response in the next request to retrieve the next set of
    -- results.
    ListDataIntegrationAssociations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return per page.
    ListDataIntegrationAssociations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A unique identifier for the DataIntegration.
    ListDataIntegrationAssociations -> Text
dataIntegrationIdentifier :: Prelude.Text
  }
  deriving (ListDataIntegrationAssociations
-> ListDataIntegrationAssociations -> Bool
(ListDataIntegrationAssociations
 -> ListDataIntegrationAssociations -> Bool)
-> (ListDataIntegrationAssociations
    -> ListDataIntegrationAssociations -> Bool)
-> Eq ListDataIntegrationAssociations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDataIntegrationAssociations
-> ListDataIntegrationAssociations -> Bool
$c/= :: ListDataIntegrationAssociations
-> ListDataIntegrationAssociations -> Bool
== :: ListDataIntegrationAssociations
-> ListDataIntegrationAssociations -> Bool
$c== :: ListDataIntegrationAssociations
-> ListDataIntegrationAssociations -> Bool
Prelude.Eq, ReadPrec [ListDataIntegrationAssociations]
ReadPrec ListDataIntegrationAssociations
Int -> ReadS ListDataIntegrationAssociations
ReadS [ListDataIntegrationAssociations]
(Int -> ReadS ListDataIntegrationAssociations)
-> ReadS [ListDataIntegrationAssociations]
-> ReadPrec ListDataIntegrationAssociations
-> ReadPrec [ListDataIntegrationAssociations]
-> Read ListDataIntegrationAssociations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDataIntegrationAssociations]
$creadListPrec :: ReadPrec [ListDataIntegrationAssociations]
readPrec :: ReadPrec ListDataIntegrationAssociations
$creadPrec :: ReadPrec ListDataIntegrationAssociations
readList :: ReadS [ListDataIntegrationAssociations]
$creadList :: ReadS [ListDataIntegrationAssociations]
readsPrec :: Int -> ReadS ListDataIntegrationAssociations
$creadsPrec :: Int -> ReadS ListDataIntegrationAssociations
Prelude.Read, Int -> ListDataIntegrationAssociations -> ShowS
[ListDataIntegrationAssociations] -> ShowS
ListDataIntegrationAssociations -> String
(Int -> ListDataIntegrationAssociations -> ShowS)
-> (ListDataIntegrationAssociations -> String)
-> ([ListDataIntegrationAssociations] -> ShowS)
-> Show ListDataIntegrationAssociations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDataIntegrationAssociations] -> ShowS
$cshowList :: [ListDataIntegrationAssociations] -> ShowS
show :: ListDataIntegrationAssociations -> String
$cshow :: ListDataIntegrationAssociations -> String
showsPrec :: Int -> ListDataIntegrationAssociations -> ShowS
$cshowsPrec :: Int -> ListDataIntegrationAssociations -> ShowS
Prelude.Show, (forall x.
 ListDataIntegrationAssociations
 -> Rep ListDataIntegrationAssociations x)
-> (forall x.
    Rep ListDataIntegrationAssociations x
    -> ListDataIntegrationAssociations)
-> Generic ListDataIntegrationAssociations
forall x.
Rep ListDataIntegrationAssociations x
-> ListDataIntegrationAssociations
forall x.
ListDataIntegrationAssociations
-> Rep ListDataIntegrationAssociations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDataIntegrationAssociations x
-> ListDataIntegrationAssociations
$cfrom :: forall x.
ListDataIntegrationAssociations
-> Rep ListDataIntegrationAssociations x
Prelude.Generic)

-- |
-- Create a value of 'ListDataIntegrationAssociations' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'listDataIntegrationAssociations_nextToken' - The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
--
-- 'maxResults', 'listDataIntegrationAssociations_maxResults' - The maximum number of results to return per page.
--
-- 'dataIntegrationIdentifier', 'listDataIntegrationAssociations_dataIntegrationIdentifier' - A unique identifier for the DataIntegration.
newListDataIntegrationAssociations ::
  -- | 'dataIntegrationIdentifier'
  Prelude.Text ->
  ListDataIntegrationAssociations
newListDataIntegrationAssociations :: Text -> ListDataIntegrationAssociations
newListDataIntegrationAssociations
  Text
pDataIntegrationIdentifier_ =
    ListDataIntegrationAssociations' :: Maybe Text
-> Maybe Natural -> Text -> ListDataIntegrationAssociations
ListDataIntegrationAssociations'
      { $sel:nextToken:ListDataIntegrationAssociations' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:ListDataIntegrationAssociations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:dataIntegrationIdentifier:ListDataIntegrationAssociations' :: Text
dataIntegrationIdentifier =
          Text
pDataIntegrationIdentifier_
      }

-- | The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
listDataIntegrationAssociations_nextToken :: Lens.Lens' ListDataIntegrationAssociations (Prelude.Maybe Prelude.Text)
listDataIntegrationAssociations_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDataIntegrationAssociations
-> f ListDataIntegrationAssociations
listDataIntegrationAssociations_nextToken = (ListDataIntegrationAssociations -> Maybe Text)
-> (ListDataIntegrationAssociations
    -> Maybe Text -> ListDataIntegrationAssociations)
-> Lens
     ListDataIntegrationAssociations
     ListDataIntegrationAssociations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataIntegrationAssociations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDataIntegrationAssociations' :: ListDataIntegrationAssociations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDataIntegrationAssociations
s@ListDataIntegrationAssociations' {} Maybe Text
a -> ListDataIntegrationAssociations
s {$sel:nextToken:ListDataIntegrationAssociations' :: Maybe Text
nextToken = Maybe Text
a} :: ListDataIntegrationAssociations)

-- | The maximum number of results to return per page.
listDataIntegrationAssociations_maxResults :: Lens.Lens' ListDataIntegrationAssociations (Prelude.Maybe Prelude.Natural)
listDataIntegrationAssociations_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListDataIntegrationAssociations
-> f ListDataIntegrationAssociations
listDataIntegrationAssociations_maxResults = (ListDataIntegrationAssociations -> Maybe Natural)
-> (ListDataIntegrationAssociations
    -> Maybe Natural -> ListDataIntegrationAssociations)
-> Lens
     ListDataIntegrationAssociations
     ListDataIntegrationAssociations
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataIntegrationAssociations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDataIntegrationAssociations' :: ListDataIntegrationAssociations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDataIntegrationAssociations
s@ListDataIntegrationAssociations' {} Maybe Natural
a -> ListDataIntegrationAssociations
s {$sel:maxResults:ListDataIntegrationAssociations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDataIntegrationAssociations)

-- | A unique identifier for the DataIntegration.
listDataIntegrationAssociations_dataIntegrationIdentifier :: Lens.Lens' ListDataIntegrationAssociations Prelude.Text
listDataIntegrationAssociations_dataIntegrationIdentifier :: (Text -> f Text)
-> ListDataIntegrationAssociations
-> f ListDataIntegrationAssociations
listDataIntegrationAssociations_dataIntegrationIdentifier = (ListDataIntegrationAssociations -> Text)
-> (ListDataIntegrationAssociations
    -> Text -> ListDataIntegrationAssociations)
-> Lens
     ListDataIntegrationAssociations
     ListDataIntegrationAssociations
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataIntegrationAssociations' {Text
dataIntegrationIdentifier :: Text
$sel:dataIntegrationIdentifier:ListDataIntegrationAssociations' :: ListDataIntegrationAssociations -> Text
dataIntegrationIdentifier} -> Text
dataIntegrationIdentifier) (\s :: ListDataIntegrationAssociations
s@ListDataIntegrationAssociations' {} Text
a -> ListDataIntegrationAssociations
s {$sel:dataIntegrationIdentifier:ListDataIntegrationAssociations' :: Text
dataIntegrationIdentifier = Text
a} :: ListDataIntegrationAssociations)

instance
  Core.AWSRequest
    ListDataIntegrationAssociations
  where
  type
    AWSResponse ListDataIntegrationAssociations =
      ListDataIntegrationAssociationsResponse
  request :: ListDataIntegrationAssociations
-> Request ListDataIntegrationAssociations
request = Service
-> ListDataIntegrationAssociations
-> Request ListDataIntegrationAssociations
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDataIntegrationAssociations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListDataIntegrationAssociations)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListDataIntegrationAssociations))
-> Logger
-> Service
-> Proxy ListDataIntegrationAssociations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListDataIntegrationAssociations)))
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 DataIntegrationAssociationSummary)
-> Maybe Text -> Int -> ListDataIntegrationAssociationsResponse
ListDataIntegrationAssociationsResponse'
            (Maybe (NonEmpty DataIntegrationAssociationSummary)
 -> Maybe Text -> Int -> ListDataIntegrationAssociationsResponse)
-> Either
     String (Maybe (NonEmpty DataIntegrationAssociationSummary))
-> Either
     String
     (Maybe Text -> Int -> ListDataIntegrationAssociationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Either
     String (Maybe (NonEmpty DataIntegrationAssociationSummary))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataIntegrationAssociations")
            Either
  String
  (Maybe Text -> Int -> ListDataIntegrationAssociationsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListDataIntegrationAssociationsResponse)
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 -> ListDataIntegrationAssociationsResponse)
-> Either String Int
-> Either String ListDataIntegrationAssociationsResponse
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
    ListDataIntegrationAssociations

instance
  Prelude.NFData
    ListDataIntegrationAssociations

instance
  Core.ToHeaders
    ListDataIntegrationAssociations
  where
  toHeaders :: ListDataIntegrationAssociations -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> ListDataIntegrationAssociations -> 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 ListDataIntegrationAssociations where
  toPath :: ListDataIntegrationAssociations -> ByteString
toPath ListDataIntegrationAssociations' {Maybe Natural
Maybe Text
Text
dataIntegrationIdentifier :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:dataIntegrationIdentifier:ListDataIntegrationAssociations' :: ListDataIntegrationAssociations -> Text
$sel:maxResults:ListDataIntegrationAssociations' :: ListDataIntegrationAssociations -> Maybe Natural
$sel:nextToken:ListDataIntegrationAssociations' :: ListDataIntegrationAssociations -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/dataIntegrations/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
dataIntegrationIdentifier,
        ByteString
"/associations"
      ]

instance Core.ToQuery ListDataIntegrationAssociations where
  toQuery :: ListDataIntegrationAssociations -> QueryString
toQuery ListDataIntegrationAssociations' {Maybe Natural
Maybe Text
Text
dataIntegrationIdentifier :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:dataIntegrationIdentifier:ListDataIntegrationAssociations' :: ListDataIntegrationAssociations -> Text
$sel:maxResults:ListDataIntegrationAssociations' :: ListDataIntegrationAssociations -> Maybe Natural
$sel:nextToken:ListDataIntegrationAssociations' :: ListDataIntegrationAssociations -> 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
      ]

-- | /See:/ 'newListDataIntegrationAssociationsResponse' smart constructor.
data ListDataIntegrationAssociationsResponse = ListDataIntegrationAssociationsResponse'
  { -- | The Amazon Resource Name (ARN) and unique ID of the DataIntegration
    -- association.
    ListDataIntegrationAssociationsResponse
-> Maybe (NonEmpty DataIntegrationAssociationSummary)
dataIntegrationAssociations :: Prelude.Maybe (Prelude.NonEmpty DataIntegrationAssociationSummary),
    -- | If there are additional results, this is the token for the next set of
    -- results.
    ListDataIntegrationAssociationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDataIntegrationAssociationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDataIntegrationAssociationsResponse
-> ListDataIntegrationAssociationsResponse -> Bool
(ListDataIntegrationAssociationsResponse
 -> ListDataIntegrationAssociationsResponse -> Bool)
-> (ListDataIntegrationAssociationsResponse
    -> ListDataIntegrationAssociationsResponse -> Bool)
-> Eq ListDataIntegrationAssociationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDataIntegrationAssociationsResponse
-> ListDataIntegrationAssociationsResponse -> Bool
$c/= :: ListDataIntegrationAssociationsResponse
-> ListDataIntegrationAssociationsResponse -> Bool
== :: ListDataIntegrationAssociationsResponse
-> ListDataIntegrationAssociationsResponse -> Bool
$c== :: ListDataIntegrationAssociationsResponse
-> ListDataIntegrationAssociationsResponse -> Bool
Prelude.Eq, ReadPrec [ListDataIntegrationAssociationsResponse]
ReadPrec ListDataIntegrationAssociationsResponse
Int -> ReadS ListDataIntegrationAssociationsResponse
ReadS [ListDataIntegrationAssociationsResponse]
(Int -> ReadS ListDataIntegrationAssociationsResponse)
-> ReadS [ListDataIntegrationAssociationsResponse]
-> ReadPrec ListDataIntegrationAssociationsResponse
-> ReadPrec [ListDataIntegrationAssociationsResponse]
-> Read ListDataIntegrationAssociationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDataIntegrationAssociationsResponse]
$creadListPrec :: ReadPrec [ListDataIntegrationAssociationsResponse]
readPrec :: ReadPrec ListDataIntegrationAssociationsResponse
$creadPrec :: ReadPrec ListDataIntegrationAssociationsResponse
readList :: ReadS [ListDataIntegrationAssociationsResponse]
$creadList :: ReadS [ListDataIntegrationAssociationsResponse]
readsPrec :: Int -> ReadS ListDataIntegrationAssociationsResponse
$creadsPrec :: Int -> ReadS ListDataIntegrationAssociationsResponse
Prelude.Read, Int -> ListDataIntegrationAssociationsResponse -> ShowS
[ListDataIntegrationAssociationsResponse] -> ShowS
ListDataIntegrationAssociationsResponse -> String
(Int -> ListDataIntegrationAssociationsResponse -> ShowS)
-> (ListDataIntegrationAssociationsResponse -> String)
-> ([ListDataIntegrationAssociationsResponse] -> ShowS)
-> Show ListDataIntegrationAssociationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDataIntegrationAssociationsResponse] -> ShowS
$cshowList :: [ListDataIntegrationAssociationsResponse] -> ShowS
show :: ListDataIntegrationAssociationsResponse -> String
$cshow :: ListDataIntegrationAssociationsResponse -> String
showsPrec :: Int -> ListDataIntegrationAssociationsResponse -> ShowS
$cshowsPrec :: Int -> ListDataIntegrationAssociationsResponse -> ShowS
Prelude.Show, (forall x.
 ListDataIntegrationAssociationsResponse
 -> Rep ListDataIntegrationAssociationsResponse x)
-> (forall x.
    Rep ListDataIntegrationAssociationsResponse x
    -> ListDataIntegrationAssociationsResponse)
-> Generic ListDataIntegrationAssociationsResponse
forall x.
Rep ListDataIntegrationAssociationsResponse x
-> ListDataIntegrationAssociationsResponse
forall x.
ListDataIntegrationAssociationsResponse
-> Rep ListDataIntegrationAssociationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDataIntegrationAssociationsResponse x
-> ListDataIntegrationAssociationsResponse
$cfrom :: forall x.
ListDataIntegrationAssociationsResponse
-> Rep ListDataIntegrationAssociationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDataIntegrationAssociationsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'dataIntegrationAssociations', 'listDataIntegrationAssociationsResponse_dataIntegrationAssociations' - The Amazon Resource Name (ARN) and unique ID of the DataIntegration
-- association.
--
-- 'nextToken', 'listDataIntegrationAssociationsResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'httpStatus', 'listDataIntegrationAssociationsResponse_httpStatus' - The response's http status code.
newListDataIntegrationAssociationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDataIntegrationAssociationsResponse
newListDataIntegrationAssociationsResponse :: Int -> ListDataIntegrationAssociationsResponse
newListDataIntegrationAssociationsResponse
  Int
pHttpStatus_ =
    ListDataIntegrationAssociationsResponse' :: Maybe (NonEmpty DataIntegrationAssociationSummary)
-> Maybe Text -> Int -> ListDataIntegrationAssociationsResponse
ListDataIntegrationAssociationsResponse'
      { $sel:dataIntegrationAssociations:ListDataIntegrationAssociationsResponse' :: Maybe (NonEmpty DataIntegrationAssociationSummary)
dataIntegrationAssociations =
          Maybe (NonEmpty DataIntegrationAssociationSummary)
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListDataIntegrationAssociationsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListDataIntegrationAssociationsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The Amazon Resource Name (ARN) and unique ID of the DataIntegration
-- association.
listDataIntegrationAssociationsResponse_dataIntegrationAssociations :: Lens.Lens' ListDataIntegrationAssociationsResponse (Prelude.Maybe (Prelude.NonEmpty DataIntegrationAssociationSummary))
listDataIntegrationAssociationsResponse_dataIntegrationAssociations :: (Maybe (NonEmpty DataIntegrationAssociationSummary)
 -> f (Maybe (NonEmpty DataIntegrationAssociationSummary)))
-> ListDataIntegrationAssociationsResponse
-> f ListDataIntegrationAssociationsResponse
listDataIntegrationAssociationsResponse_dataIntegrationAssociations = (ListDataIntegrationAssociationsResponse
 -> Maybe (NonEmpty DataIntegrationAssociationSummary))
-> (ListDataIntegrationAssociationsResponse
    -> Maybe (NonEmpty DataIntegrationAssociationSummary)
    -> ListDataIntegrationAssociationsResponse)
-> Lens
     ListDataIntegrationAssociationsResponse
     ListDataIntegrationAssociationsResponse
     (Maybe (NonEmpty DataIntegrationAssociationSummary))
     (Maybe (NonEmpty DataIntegrationAssociationSummary))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataIntegrationAssociationsResponse' {Maybe (NonEmpty DataIntegrationAssociationSummary)
dataIntegrationAssociations :: Maybe (NonEmpty DataIntegrationAssociationSummary)
$sel:dataIntegrationAssociations:ListDataIntegrationAssociationsResponse' :: ListDataIntegrationAssociationsResponse
-> Maybe (NonEmpty DataIntegrationAssociationSummary)
dataIntegrationAssociations} -> Maybe (NonEmpty DataIntegrationAssociationSummary)
dataIntegrationAssociations) (\s :: ListDataIntegrationAssociationsResponse
s@ListDataIntegrationAssociationsResponse' {} Maybe (NonEmpty DataIntegrationAssociationSummary)
a -> ListDataIntegrationAssociationsResponse
s {$sel:dataIntegrationAssociations:ListDataIntegrationAssociationsResponse' :: Maybe (NonEmpty DataIntegrationAssociationSummary)
dataIntegrationAssociations = Maybe (NonEmpty DataIntegrationAssociationSummary)
a} :: ListDataIntegrationAssociationsResponse) ((Maybe (NonEmpty DataIntegrationAssociationSummary)
  -> f (Maybe (NonEmpty DataIntegrationAssociationSummary)))
 -> ListDataIntegrationAssociationsResponse
 -> f ListDataIntegrationAssociationsResponse)
-> ((Maybe (NonEmpty DataIntegrationAssociationSummary)
     -> f (Maybe (NonEmpty DataIntegrationAssociationSummary)))
    -> Maybe (NonEmpty DataIntegrationAssociationSummary)
    -> f (Maybe (NonEmpty DataIntegrationAssociationSummary)))
-> (Maybe (NonEmpty DataIntegrationAssociationSummary)
    -> f (Maybe (NonEmpty DataIntegrationAssociationSummary)))
-> ListDataIntegrationAssociationsResponse
-> f ListDataIntegrationAssociationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty DataIntegrationAssociationSummary)
  (NonEmpty DataIntegrationAssociationSummary)
  (NonEmpty DataIntegrationAssociationSummary)
  (NonEmpty DataIntegrationAssociationSummary)
-> Iso
     (Maybe (NonEmpty DataIntegrationAssociationSummary))
     (Maybe (NonEmpty DataIntegrationAssociationSummary))
     (Maybe (NonEmpty DataIntegrationAssociationSummary))
     (Maybe (NonEmpty DataIntegrationAssociationSummary))
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 DataIntegrationAssociationSummary)
  (NonEmpty DataIntegrationAssociationSummary)
  (NonEmpty DataIntegrationAssociationSummary)
  (NonEmpty DataIntegrationAssociationSummary)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If there are additional results, this is the token for the next set of
-- results.
listDataIntegrationAssociationsResponse_nextToken :: Lens.Lens' ListDataIntegrationAssociationsResponse (Prelude.Maybe Prelude.Text)
listDataIntegrationAssociationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDataIntegrationAssociationsResponse
-> f ListDataIntegrationAssociationsResponse
listDataIntegrationAssociationsResponse_nextToken = (ListDataIntegrationAssociationsResponse -> Maybe Text)
-> (ListDataIntegrationAssociationsResponse
    -> Maybe Text -> ListDataIntegrationAssociationsResponse)
-> Lens
     ListDataIntegrationAssociationsResponse
     ListDataIntegrationAssociationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataIntegrationAssociationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDataIntegrationAssociationsResponse' :: ListDataIntegrationAssociationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDataIntegrationAssociationsResponse
s@ListDataIntegrationAssociationsResponse' {} Maybe Text
a -> ListDataIntegrationAssociationsResponse
s {$sel:nextToken:ListDataIntegrationAssociationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDataIntegrationAssociationsResponse)

-- | The response's http status code.
listDataIntegrationAssociationsResponse_httpStatus :: Lens.Lens' ListDataIntegrationAssociationsResponse Prelude.Int
listDataIntegrationAssociationsResponse_httpStatus :: (Int -> f Int)
-> ListDataIntegrationAssociationsResponse
-> f ListDataIntegrationAssociationsResponse
listDataIntegrationAssociationsResponse_httpStatus = (ListDataIntegrationAssociationsResponse -> Int)
-> (ListDataIntegrationAssociationsResponse
    -> Int -> ListDataIntegrationAssociationsResponse)
-> Lens
     ListDataIntegrationAssociationsResponse
     ListDataIntegrationAssociationsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDataIntegrationAssociationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListDataIntegrationAssociationsResponse' :: ListDataIntegrationAssociationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListDataIntegrationAssociationsResponse
s@ListDataIntegrationAssociationsResponse' {} Int
a -> ListDataIntegrationAssociationsResponse
s {$sel:httpStatus:ListDataIntegrationAssociationsResponse' :: Int
httpStatus = Int
a} :: ListDataIntegrationAssociationsResponse)

instance
  Prelude.NFData
    ListDataIntegrationAssociationsResponse