{-# 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.Wisdom.ListAssistantAssociations
-- 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)
--
-- Lists information about assistant associations.
--
-- This operation returns paginated results.
module Amazonka.Wisdom.ListAssistantAssociations
  ( -- * Creating a Request
    ListAssistantAssociations (..),
    newListAssistantAssociations,

    -- * Request Lenses
    listAssistantAssociations_nextToken,
    listAssistantAssociations_maxResults,
    listAssistantAssociations_assistantId,

    -- * Destructuring the Response
    ListAssistantAssociationsResponse (..),
    newListAssistantAssociationsResponse,

    -- * Response Lenses
    listAssistantAssociationsResponse_nextToken,
    listAssistantAssociationsResponse_httpStatus,
    listAssistantAssociationsResponse_assistantAssociationSummaries,
  )
where

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
import Amazonka.Wisdom.Types

-- | /See:/ 'newListAssistantAssociations' smart constructor.
data ListAssistantAssociations = ListAssistantAssociations'
  { -- | 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.
    ListAssistantAssociations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return per page.
    ListAssistantAssociations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The identifier of the Wisdom assistant. Can be either the ID or the ARN.
    -- URLs cannot contain the ARN.
    ListAssistantAssociations -> Text
assistantId :: Prelude.Text
  }
  deriving (ListAssistantAssociations -> ListAssistantAssociations -> Bool
(ListAssistantAssociations -> ListAssistantAssociations -> Bool)
-> (ListAssistantAssociations -> ListAssistantAssociations -> Bool)
-> Eq ListAssistantAssociations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAssistantAssociations -> ListAssistantAssociations -> Bool
$c/= :: ListAssistantAssociations -> ListAssistantAssociations -> Bool
== :: ListAssistantAssociations -> ListAssistantAssociations -> Bool
$c== :: ListAssistantAssociations -> ListAssistantAssociations -> Bool
Prelude.Eq, ReadPrec [ListAssistantAssociations]
ReadPrec ListAssistantAssociations
Int -> ReadS ListAssistantAssociations
ReadS [ListAssistantAssociations]
(Int -> ReadS ListAssistantAssociations)
-> ReadS [ListAssistantAssociations]
-> ReadPrec ListAssistantAssociations
-> ReadPrec [ListAssistantAssociations]
-> Read ListAssistantAssociations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAssistantAssociations]
$creadListPrec :: ReadPrec [ListAssistantAssociations]
readPrec :: ReadPrec ListAssistantAssociations
$creadPrec :: ReadPrec ListAssistantAssociations
readList :: ReadS [ListAssistantAssociations]
$creadList :: ReadS [ListAssistantAssociations]
readsPrec :: Int -> ReadS ListAssistantAssociations
$creadsPrec :: Int -> ReadS ListAssistantAssociations
Prelude.Read, Int -> ListAssistantAssociations -> ShowS
[ListAssistantAssociations] -> ShowS
ListAssistantAssociations -> String
(Int -> ListAssistantAssociations -> ShowS)
-> (ListAssistantAssociations -> String)
-> ([ListAssistantAssociations] -> ShowS)
-> Show ListAssistantAssociations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAssistantAssociations] -> ShowS
$cshowList :: [ListAssistantAssociations] -> ShowS
show :: ListAssistantAssociations -> String
$cshow :: ListAssistantAssociations -> String
showsPrec :: Int -> ListAssistantAssociations -> ShowS
$cshowsPrec :: Int -> ListAssistantAssociations -> ShowS
Prelude.Show, (forall x.
 ListAssistantAssociations -> Rep ListAssistantAssociations x)
-> (forall x.
    Rep ListAssistantAssociations x -> ListAssistantAssociations)
-> Generic ListAssistantAssociations
forall x.
Rep ListAssistantAssociations x -> ListAssistantAssociations
forall x.
ListAssistantAssociations -> Rep ListAssistantAssociations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAssistantAssociations x -> ListAssistantAssociations
$cfrom :: forall x.
ListAssistantAssociations -> Rep ListAssistantAssociations x
Prelude.Generic)

-- |
-- Create a value of 'ListAssistantAssociations' 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', 'listAssistantAssociations_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', 'listAssistantAssociations_maxResults' - The maximum number of results to return per page.
--
-- 'assistantId', 'listAssistantAssociations_assistantId' - The identifier of the Wisdom assistant. Can be either the ID or the ARN.
-- URLs cannot contain the ARN.
newListAssistantAssociations ::
  -- | 'assistantId'
  Prelude.Text ->
  ListAssistantAssociations
newListAssistantAssociations :: Text -> ListAssistantAssociations
newListAssistantAssociations Text
pAssistantId_ =
  ListAssistantAssociations' :: Maybe Text -> Maybe Natural -> Text -> ListAssistantAssociations
ListAssistantAssociations'
    { $sel:nextToken:ListAssistantAssociations' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListAssistantAssociations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:assistantId:ListAssistantAssociations' :: Text
assistantId = Text
pAssistantId_
    }

-- | 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.
listAssistantAssociations_nextToken :: Lens.Lens' ListAssistantAssociations (Prelude.Maybe Prelude.Text)
listAssistantAssociations_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListAssistantAssociations -> f ListAssistantAssociations
listAssistantAssociations_nextToken = (ListAssistantAssociations -> Maybe Text)
-> (ListAssistantAssociations
    -> Maybe Text -> ListAssistantAssociations)
-> Lens
     ListAssistantAssociations
     ListAssistantAssociations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssistantAssociations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAssistantAssociations' :: ListAssistantAssociations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAssistantAssociations
s@ListAssistantAssociations' {} Maybe Text
a -> ListAssistantAssociations
s {$sel:nextToken:ListAssistantAssociations' :: Maybe Text
nextToken = Maybe Text
a} :: ListAssistantAssociations)

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

-- | The identifier of the Wisdom assistant. Can be either the ID or the ARN.
-- URLs cannot contain the ARN.
listAssistantAssociations_assistantId :: Lens.Lens' ListAssistantAssociations Prelude.Text
listAssistantAssociations_assistantId :: (Text -> f Text)
-> ListAssistantAssociations -> f ListAssistantAssociations
listAssistantAssociations_assistantId = (ListAssistantAssociations -> Text)
-> (ListAssistantAssociations -> Text -> ListAssistantAssociations)
-> Lens
     ListAssistantAssociations ListAssistantAssociations Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssistantAssociations' {Text
assistantId :: Text
$sel:assistantId:ListAssistantAssociations' :: ListAssistantAssociations -> Text
assistantId} -> Text
assistantId) (\s :: ListAssistantAssociations
s@ListAssistantAssociations' {} Text
a -> ListAssistantAssociations
s {$sel:assistantId:ListAssistantAssociations' :: Text
assistantId = Text
a} :: ListAssistantAssociations)

instance Core.AWSPager ListAssistantAssociations where
  page :: ListAssistantAssociations
-> AWSResponse ListAssistantAssociations
-> Maybe ListAssistantAssociations
page ListAssistantAssociations
rq AWSResponse ListAssistantAssociations
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListAssistantAssociations
ListAssistantAssociationsResponse
rs
            ListAssistantAssociationsResponse
-> Getting (First Text) ListAssistantAssociationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAssistantAssociationsResponse
-> Const (First Text) ListAssistantAssociationsResponse
Lens' ListAssistantAssociationsResponse (Maybe Text)
listAssistantAssociationsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListAssistantAssociationsResponse
 -> Const (First Text) ListAssistantAssociationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListAssistantAssociationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListAssistantAssociations
forall a. Maybe a
Prelude.Nothing
    | [AssistantAssociationSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListAssistantAssociations
ListAssistantAssociationsResponse
rs
            ListAssistantAssociationsResponse
-> Getting
     [AssistantAssociationSummary]
     ListAssistantAssociationsResponse
     [AssistantAssociationSummary]
-> [AssistantAssociationSummary]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
  [AssistantAssociationSummary]
  ListAssistantAssociationsResponse
  [AssistantAssociationSummary]
Lens'
  ListAssistantAssociationsResponse [AssistantAssociationSummary]
listAssistantAssociationsResponse_assistantAssociationSummaries
        ) =
      Maybe ListAssistantAssociations
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListAssistantAssociations -> Maybe ListAssistantAssociations
forall a. a -> Maybe a
Prelude.Just (ListAssistantAssociations -> Maybe ListAssistantAssociations)
-> ListAssistantAssociations -> Maybe ListAssistantAssociations
forall a b. (a -> b) -> a -> b
Prelude.$
        ListAssistantAssociations
rq
          ListAssistantAssociations
-> (ListAssistantAssociations -> ListAssistantAssociations)
-> ListAssistantAssociations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListAssistantAssociations -> Identity ListAssistantAssociations
Lens
  ListAssistantAssociations
  ListAssistantAssociations
  (Maybe Text)
  (Maybe Text)
listAssistantAssociations_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListAssistantAssociations -> Identity ListAssistantAssociations)
-> Maybe Text
-> ListAssistantAssociations
-> ListAssistantAssociations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAssistantAssociations
ListAssistantAssociationsResponse
rs
          ListAssistantAssociationsResponse
-> Getting (First Text) ListAssistantAssociationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAssistantAssociationsResponse
-> Const (First Text) ListAssistantAssociationsResponse
Lens' ListAssistantAssociationsResponse (Maybe Text)
listAssistantAssociationsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListAssistantAssociationsResponse
 -> Const (First Text) ListAssistantAssociationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListAssistantAssociationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListAssistantAssociations where
  type
    AWSResponse ListAssistantAssociations =
      ListAssistantAssociationsResponse
  request :: ListAssistantAssociations -> Request ListAssistantAssociations
request = Service
-> ListAssistantAssociations -> Request ListAssistantAssociations
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListAssistantAssociations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAssistantAssociations)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListAssistantAssociations))
-> Logger
-> Service
-> Proxy ListAssistantAssociations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAssistantAssociations)))
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 Text
-> Int
-> [AssistantAssociationSummary]
-> ListAssistantAssociationsResponse
ListAssistantAssociationsResponse'
            (Maybe Text
 -> Int
 -> [AssistantAssociationSummary]
 -> ListAssistantAssociationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> [AssistantAssociationSummary]
      -> ListAssistantAssociationsResponse)
forall (f :: * -> *) a b. Functor 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
   -> [AssistantAssociationSummary]
   -> ListAssistantAssociationsResponse)
-> Either String Int
-> Either
     String
     ([AssistantAssociationSummary]
      -> ListAssistantAssociationsResponse)
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))
            Either
  String
  ([AssistantAssociationSummary]
   -> ListAssistantAssociationsResponse)
-> Either String [AssistantAssociationSummary]
-> Either String ListAssistantAssociationsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe [AssistantAssociationSummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"assistantAssociationSummaries"
                            Either String (Maybe [AssistantAssociationSummary])
-> [AssistantAssociationSummary]
-> Either String [AssistantAssociationSummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [AssistantAssociationSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable ListAssistantAssociations

instance Prelude.NFData ListAssistantAssociations

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

instance Core.ToQuery ListAssistantAssociations where
  toQuery :: ListAssistantAssociations -> QueryString
toQuery ListAssistantAssociations' {Maybe Natural
Maybe Text
Text
assistantId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:assistantId:ListAssistantAssociations' :: ListAssistantAssociations -> Text
$sel:maxResults:ListAssistantAssociations' :: ListAssistantAssociations -> Maybe Natural
$sel:nextToken:ListAssistantAssociations' :: ListAssistantAssociations -> 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:/ 'newListAssistantAssociationsResponse' smart constructor.
data ListAssistantAssociationsResponse = ListAssistantAssociationsResponse'
  { -- | If there are additional results, this is the token for the next set of
    -- results.
    ListAssistantAssociationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListAssistantAssociationsResponse -> Int
httpStatus :: Prelude.Int,
    -- | Summary information about assistant associations.
    ListAssistantAssociationsResponse -> [AssistantAssociationSummary]
assistantAssociationSummaries :: [AssistantAssociationSummary]
  }
  deriving (ListAssistantAssociationsResponse
-> ListAssistantAssociationsResponse -> Bool
(ListAssistantAssociationsResponse
 -> ListAssistantAssociationsResponse -> Bool)
-> (ListAssistantAssociationsResponse
    -> ListAssistantAssociationsResponse -> Bool)
-> Eq ListAssistantAssociationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAssistantAssociationsResponse
-> ListAssistantAssociationsResponse -> Bool
$c/= :: ListAssistantAssociationsResponse
-> ListAssistantAssociationsResponse -> Bool
== :: ListAssistantAssociationsResponse
-> ListAssistantAssociationsResponse -> Bool
$c== :: ListAssistantAssociationsResponse
-> ListAssistantAssociationsResponse -> Bool
Prelude.Eq, ReadPrec [ListAssistantAssociationsResponse]
ReadPrec ListAssistantAssociationsResponse
Int -> ReadS ListAssistantAssociationsResponse
ReadS [ListAssistantAssociationsResponse]
(Int -> ReadS ListAssistantAssociationsResponse)
-> ReadS [ListAssistantAssociationsResponse]
-> ReadPrec ListAssistantAssociationsResponse
-> ReadPrec [ListAssistantAssociationsResponse]
-> Read ListAssistantAssociationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAssistantAssociationsResponse]
$creadListPrec :: ReadPrec [ListAssistantAssociationsResponse]
readPrec :: ReadPrec ListAssistantAssociationsResponse
$creadPrec :: ReadPrec ListAssistantAssociationsResponse
readList :: ReadS [ListAssistantAssociationsResponse]
$creadList :: ReadS [ListAssistantAssociationsResponse]
readsPrec :: Int -> ReadS ListAssistantAssociationsResponse
$creadsPrec :: Int -> ReadS ListAssistantAssociationsResponse
Prelude.Read, Int -> ListAssistantAssociationsResponse -> ShowS
[ListAssistantAssociationsResponse] -> ShowS
ListAssistantAssociationsResponse -> String
(Int -> ListAssistantAssociationsResponse -> ShowS)
-> (ListAssistantAssociationsResponse -> String)
-> ([ListAssistantAssociationsResponse] -> ShowS)
-> Show ListAssistantAssociationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAssistantAssociationsResponse] -> ShowS
$cshowList :: [ListAssistantAssociationsResponse] -> ShowS
show :: ListAssistantAssociationsResponse -> String
$cshow :: ListAssistantAssociationsResponse -> String
showsPrec :: Int -> ListAssistantAssociationsResponse -> ShowS
$cshowsPrec :: Int -> ListAssistantAssociationsResponse -> ShowS
Prelude.Show, (forall x.
 ListAssistantAssociationsResponse
 -> Rep ListAssistantAssociationsResponse x)
-> (forall x.
    Rep ListAssistantAssociationsResponse x
    -> ListAssistantAssociationsResponse)
-> Generic ListAssistantAssociationsResponse
forall x.
Rep ListAssistantAssociationsResponse x
-> ListAssistantAssociationsResponse
forall x.
ListAssistantAssociationsResponse
-> Rep ListAssistantAssociationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAssistantAssociationsResponse x
-> ListAssistantAssociationsResponse
$cfrom :: forall x.
ListAssistantAssociationsResponse
-> Rep ListAssistantAssociationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAssistantAssociationsResponse' 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', 'listAssistantAssociationsResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'httpStatus', 'listAssistantAssociationsResponse_httpStatus' - The response's http status code.
--
-- 'assistantAssociationSummaries', 'listAssistantAssociationsResponse_assistantAssociationSummaries' - Summary information about assistant associations.
newListAssistantAssociationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAssistantAssociationsResponse
newListAssistantAssociationsResponse :: Int -> ListAssistantAssociationsResponse
newListAssistantAssociationsResponse Int
pHttpStatus_ =
  ListAssistantAssociationsResponse' :: Maybe Text
-> Int
-> [AssistantAssociationSummary]
-> ListAssistantAssociationsResponse
ListAssistantAssociationsResponse'
    { $sel:nextToken:ListAssistantAssociationsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAssistantAssociationsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:assistantAssociationSummaries:ListAssistantAssociationsResponse' :: [AssistantAssociationSummary]
assistantAssociationSummaries =
        [AssistantAssociationSummary]
forall a. Monoid a => a
Prelude.mempty
    }

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

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

-- | Summary information about assistant associations.
listAssistantAssociationsResponse_assistantAssociationSummaries :: Lens.Lens' ListAssistantAssociationsResponse [AssistantAssociationSummary]
listAssistantAssociationsResponse_assistantAssociationSummaries :: ([AssistantAssociationSummary] -> f [AssistantAssociationSummary])
-> ListAssistantAssociationsResponse
-> f ListAssistantAssociationsResponse
listAssistantAssociationsResponse_assistantAssociationSummaries = (ListAssistantAssociationsResponse
 -> [AssistantAssociationSummary])
-> (ListAssistantAssociationsResponse
    -> [AssistantAssociationSummary]
    -> ListAssistantAssociationsResponse)
-> Lens'
     ListAssistantAssociationsResponse [AssistantAssociationSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssistantAssociationsResponse' {[AssistantAssociationSummary]
assistantAssociationSummaries :: [AssistantAssociationSummary]
$sel:assistantAssociationSummaries:ListAssistantAssociationsResponse' :: ListAssistantAssociationsResponse -> [AssistantAssociationSummary]
assistantAssociationSummaries} -> [AssistantAssociationSummary]
assistantAssociationSummaries) (\s :: ListAssistantAssociationsResponse
s@ListAssistantAssociationsResponse' {} [AssistantAssociationSummary]
a -> ListAssistantAssociationsResponse
s {$sel:assistantAssociationSummaries:ListAssistantAssociationsResponse' :: [AssistantAssociationSummary]
assistantAssociationSummaries = [AssistantAssociationSummary]
a} :: ListAssistantAssociationsResponse) (([AssistantAssociationSummary] -> f [AssistantAssociationSummary])
 -> ListAssistantAssociationsResponse
 -> f ListAssistantAssociationsResponse)
-> (([AssistantAssociationSummary]
     -> f [AssistantAssociationSummary])
    -> [AssistantAssociationSummary]
    -> f [AssistantAssociationSummary])
-> ([AssistantAssociationSummary]
    -> f [AssistantAssociationSummary])
-> ListAssistantAssociationsResponse
-> f ListAssistantAssociationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AssistantAssociationSummary] -> f [AssistantAssociationSummary])
-> [AssistantAssociationSummary] -> f [AssistantAssociationSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListAssistantAssociationsResponse