{-# 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.SearchContent
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Searches for content in a specified knowledge base. Can be used to get a
-- specific content resource by its name.
--
-- This operation returns paginated results.
module Amazonka.Wisdom.SearchContent
  ( -- * Creating a Request
    SearchContent (..),
    newSearchContent,

    -- * Request Lenses
    searchContent_maxResults,
    searchContent_nextToken,
    searchContent_knowledgeBaseId,
    searchContent_searchExpression,

    -- * Destructuring the Response
    SearchContentResponse (..),
    newSearchContentResponse,

    -- * Response Lenses
    searchContentResponse_nextToken,
    searchContentResponse_httpStatus,
    searchContentResponse_contentSummaries,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Wisdom.Types

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

-- |
-- Create a value of 'SearchContent' 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:
--
-- 'maxResults', 'searchContent_maxResults' - The maximum number of results to return per page.
--
-- 'nextToken', 'searchContent_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.
--
-- 'knowledgeBaseId', 'searchContent_knowledgeBaseId' - The identifier of the knowledge base. Can be either the ID or the ARN.
-- URLs cannot contain the ARN.
--
-- 'searchExpression', 'searchContent_searchExpression' - The search expression to filter results.
newSearchContent ::
  -- | 'knowledgeBaseId'
  Prelude.Text ->
  -- | 'searchExpression'
  SearchExpression ->
  SearchContent
newSearchContent :: Text -> SearchExpression -> SearchContent
newSearchContent Text
pKnowledgeBaseId_ SearchExpression
pSearchExpression_ =
  SearchContent'
    { $sel:maxResults:SearchContent' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:SearchContent' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:knowledgeBaseId:SearchContent' :: Text
knowledgeBaseId = Text
pKnowledgeBaseId_,
      $sel:searchExpression:SearchContent' :: SearchExpression
searchExpression = SearchExpression
pSearchExpression_
    }

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

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

-- | The identifier of the knowledge base. Can be either the ID or the ARN.
-- URLs cannot contain the ARN.
searchContent_knowledgeBaseId :: Lens.Lens' SearchContent Prelude.Text
searchContent_knowledgeBaseId :: Lens' SearchContent Text
searchContent_knowledgeBaseId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchContent' {Text
knowledgeBaseId :: Text
$sel:knowledgeBaseId:SearchContent' :: SearchContent -> Text
knowledgeBaseId} -> Text
knowledgeBaseId) (\s :: SearchContent
s@SearchContent' {} Text
a -> SearchContent
s {$sel:knowledgeBaseId:SearchContent' :: Text
knowledgeBaseId = Text
a} :: SearchContent)

-- | The search expression to filter results.
searchContent_searchExpression :: Lens.Lens' SearchContent SearchExpression
searchContent_searchExpression :: Lens' SearchContent SearchExpression
searchContent_searchExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchContent' {SearchExpression
searchExpression :: SearchExpression
$sel:searchExpression:SearchContent' :: SearchContent -> SearchExpression
searchExpression} -> SearchExpression
searchExpression) (\s :: SearchContent
s@SearchContent' {} SearchExpression
a -> SearchContent
s {$sel:searchExpression:SearchContent' :: SearchExpression
searchExpression = SearchExpression
a} :: SearchContent)

instance Core.AWSPager SearchContent where
  page :: SearchContent -> AWSResponse SearchContent -> Maybe SearchContent
page SearchContent
rq AWSResponse SearchContent
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse SearchContent
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SearchContentResponse (Maybe Text)
searchContentResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse SearchContent
rs forall s a. s -> Getting a s a -> a
Lens.^. Lens' SearchContentResponse [ContentSummary]
searchContentResponse_contentSummaries) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ SearchContent
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' SearchContent (Maybe Text)
searchContent_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse SearchContent
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SearchContentResponse (Maybe Text)
searchContentResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest SearchContent where
  type
    AWSResponse SearchContent =
      SearchContentResponse
  request :: (Service -> Service) -> SearchContent -> Request SearchContent
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SearchContent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SearchContent)))
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 Text -> Int -> [ContentSummary] -> SearchContentResponse
SearchContentResponse'
            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
"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))
            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
"contentSummaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable SearchContent where
  hashWithSalt :: Int -> SearchContent -> Int
hashWithSalt Int
_salt SearchContent' {Maybe Natural
Maybe Text
Text
SearchExpression
searchExpression :: SearchExpression
knowledgeBaseId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:searchExpression:SearchContent' :: SearchContent -> SearchExpression
$sel:knowledgeBaseId:SearchContent' :: SearchContent -> Text
$sel:nextToken:SearchContent' :: SearchContent -> Maybe Text
$sel:maxResults:SearchContent' :: SearchContent -> Maybe Natural
..} =
    Int
_salt
      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
knowledgeBaseId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` SearchExpression
searchExpression

instance Prelude.NFData SearchContent where
  rnf :: SearchContent -> ()
rnf SearchContent' {Maybe Natural
Maybe Text
Text
SearchExpression
searchExpression :: SearchExpression
knowledgeBaseId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:searchExpression:SearchContent' :: SearchContent -> SearchExpression
$sel:knowledgeBaseId:SearchContent' :: SearchContent -> Text
$sel:nextToken:SearchContent' :: SearchContent -> Maybe Text
$sel:maxResults:SearchContent' :: SearchContent -> Maybe Natural
..} =
    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
knowledgeBaseId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf SearchExpression
searchExpression

instance Data.ToHeaders SearchContent where
  toHeaders :: SearchContent -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON SearchContent where
  toJSON :: SearchContent -> Value
toJSON SearchContent' {Maybe Natural
Maybe Text
Text
SearchExpression
searchExpression :: SearchExpression
knowledgeBaseId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:searchExpression:SearchContent' :: SearchContent -> SearchExpression
$sel:knowledgeBaseId:SearchContent' :: SearchContent -> Text
$sel:nextToken:SearchContent' :: SearchContent -> Maybe Text
$sel:maxResults:SearchContent' :: SearchContent -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              (Key
"searchExpression" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= SearchExpression
searchExpression)
          ]
      )

instance Data.ToPath SearchContent where
  toPath :: SearchContent -> ByteString
toPath SearchContent' {Maybe Natural
Maybe Text
Text
SearchExpression
searchExpression :: SearchExpression
knowledgeBaseId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:searchExpression:SearchContent' :: SearchContent -> SearchExpression
$sel:knowledgeBaseId:SearchContent' :: SearchContent -> Text
$sel:nextToken:SearchContent' :: SearchContent -> Maybe Text
$sel:maxResults:SearchContent' :: SearchContent -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/knowledgeBases/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
knowledgeBaseId,
        ByteString
"/search"
      ]

instance Data.ToQuery SearchContent where
  toQuery :: SearchContent -> QueryString
toQuery SearchContent' {Maybe Natural
Maybe Text
Text
SearchExpression
searchExpression :: SearchExpression
knowledgeBaseId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:searchExpression:SearchContent' :: SearchContent -> SearchExpression
$sel:knowledgeBaseId:SearchContent' :: SearchContent -> Text
$sel:nextToken:SearchContent' :: SearchContent -> Maybe Text
$sel:maxResults:SearchContent' :: SearchContent -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newSearchContentResponse' smart constructor.
data SearchContentResponse = SearchContentResponse'
  { -- | If there are additional results, this is the token for the next set of
    -- results.
    SearchContentResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    SearchContentResponse -> Int
httpStatus :: Prelude.Int,
    -- | Summary information about the content.
    SearchContentResponse -> [ContentSummary]
contentSummaries :: [ContentSummary]
  }
  deriving (SearchContentResponse -> SearchContentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchContentResponse -> SearchContentResponse -> Bool
$c/= :: SearchContentResponse -> SearchContentResponse -> Bool
== :: SearchContentResponse -> SearchContentResponse -> Bool
$c== :: SearchContentResponse -> SearchContentResponse -> Bool
Prelude.Eq, ReadPrec [SearchContentResponse]
ReadPrec SearchContentResponse
Int -> ReadS SearchContentResponse
ReadS [SearchContentResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchContentResponse]
$creadListPrec :: ReadPrec [SearchContentResponse]
readPrec :: ReadPrec SearchContentResponse
$creadPrec :: ReadPrec SearchContentResponse
readList :: ReadS [SearchContentResponse]
$creadList :: ReadS [SearchContentResponse]
readsPrec :: Int -> ReadS SearchContentResponse
$creadsPrec :: Int -> ReadS SearchContentResponse
Prelude.Read, Int -> SearchContentResponse -> ShowS
[SearchContentResponse] -> ShowS
SearchContentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchContentResponse] -> ShowS
$cshowList :: [SearchContentResponse] -> ShowS
show :: SearchContentResponse -> String
$cshow :: SearchContentResponse -> String
showsPrec :: Int -> SearchContentResponse -> ShowS
$cshowsPrec :: Int -> SearchContentResponse -> ShowS
Prelude.Show, forall x. Rep SearchContentResponse x -> SearchContentResponse
forall x. SearchContentResponse -> Rep SearchContentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchContentResponse x -> SearchContentResponse
$cfrom :: forall x. SearchContentResponse -> Rep SearchContentResponse x
Prelude.Generic)

-- |
-- Create a value of 'SearchContentResponse' 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', 'searchContentResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'httpStatus', 'searchContentResponse_httpStatus' - The response's http status code.
--
-- 'contentSummaries', 'searchContentResponse_contentSummaries' - Summary information about the content.
newSearchContentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SearchContentResponse
newSearchContentResponse :: Int -> SearchContentResponse
newSearchContentResponse Int
pHttpStatus_ =
  SearchContentResponse'
    { $sel:nextToken:SearchContentResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:SearchContentResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:contentSummaries:SearchContentResponse' :: [ContentSummary]
contentSummaries = forall a. Monoid a => a
Prelude.mempty
    }

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

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

-- | Summary information about the content.
searchContentResponse_contentSummaries :: Lens.Lens' SearchContentResponse [ContentSummary]
searchContentResponse_contentSummaries :: Lens' SearchContentResponse [ContentSummary]
searchContentResponse_contentSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchContentResponse' {[ContentSummary]
contentSummaries :: [ContentSummary]
$sel:contentSummaries:SearchContentResponse' :: SearchContentResponse -> [ContentSummary]
contentSummaries} -> [ContentSummary]
contentSummaries) (\s :: SearchContentResponse
s@SearchContentResponse' {} [ContentSummary]
a -> SearchContentResponse
s {$sel:contentSummaries:SearchContentResponse' :: [ContentSummary]
contentSummaries = [ContentSummary]
a} :: SearchContentResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData SearchContentResponse where
  rnf :: SearchContentResponse -> ()
rnf SearchContentResponse' {Int
[ContentSummary]
Maybe Text
contentSummaries :: [ContentSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:contentSummaries:SearchContentResponse' :: SearchContentResponse -> [ContentSummary]
$sel:httpStatus:SearchContentResponse' :: SearchContentResponse -> Int
$sel:nextToken:SearchContentResponse' :: SearchContentResponse -> Maybe Text
..} =
    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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [ContentSummary]
contentSummaries