{-# 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.LexModels.GetBuiltinIntents
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a list of built-in intents that meet the specified criteria.
--
-- This operation requires permission for the @lex:GetBuiltinIntents@
-- action.
--
-- This operation returns paginated results.
module Amazonka.LexModels.GetBuiltinIntents
  ( -- * Creating a Request
    GetBuiltinIntents (..),
    newGetBuiltinIntents,

    -- * Request Lenses
    getBuiltinIntents_locale,
    getBuiltinIntents_maxResults,
    getBuiltinIntents_nextToken,
    getBuiltinIntents_signatureContains,

    -- * Destructuring the Response
    GetBuiltinIntentsResponse (..),
    newGetBuiltinIntentsResponse,

    -- * Response Lenses
    getBuiltinIntentsResponse_intents,
    getBuiltinIntentsResponse_nextToken,
    getBuiltinIntentsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetBuiltinIntents' smart constructor.
data GetBuiltinIntents = GetBuiltinIntents'
  { -- | A list of locales that the intent supports.
    GetBuiltinIntents -> Maybe Locale
locale :: Prelude.Maybe Locale,
    -- | The maximum number of intents to return in the response. The default is
    -- 10.
    GetBuiltinIntents -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A pagination token that fetches the next page of intents. If this API
    -- call is truncated, Amazon Lex returns a pagination token in the
    -- response. To fetch the next page of intents, use the pagination token in
    -- the next request.
    GetBuiltinIntents -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Substring to match in built-in intent signatures. An intent will be
    -- returned if any part of its signature matches the substring. For
    -- example, \"xyz\" matches both \"xyzabc\" and \"abcxyz.\" To find the
    -- signature for an intent, see
    -- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents Standard Built-in Intents>
    -- in the /Alexa Skills Kit/.
    GetBuiltinIntents -> Maybe Text
signatureContains :: Prelude.Maybe Prelude.Text
  }
  deriving (GetBuiltinIntents -> GetBuiltinIntents -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBuiltinIntents -> GetBuiltinIntents -> Bool
$c/= :: GetBuiltinIntents -> GetBuiltinIntents -> Bool
== :: GetBuiltinIntents -> GetBuiltinIntents -> Bool
$c== :: GetBuiltinIntents -> GetBuiltinIntents -> Bool
Prelude.Eq, ReadPrec [GetBuiltinIntents]
ReadPrec GetBuiltinIntents
Int -> ReadS GetBuiltinIntents
ReadS [GetBuiltinIntents]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBuiltinIntents]
$creadListPrec :: ReadPrec [GetBuiltinIntents]
readPrec :: ReadPrec GetBuiltinIntents
$creadPrec :: ReadPrec GetBuiltinIntents
readList :: ReadS [GetBuiltinIntents]
$creadList :: ReadS [GetBuiltinIntents]
readsPrec :: Int -> ReadS GetBuiltinIntents
$creadsPrec :: Int -> ReadS GetBuiltinIntents
Prelude.Read, Int -> GetBuiltinIntents -> ShowS
[GetBuiltinIntents] -> ShowS
GetBuiltinIntents -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBuiltinIntents] -> ShowS
$cshowList :: [GetBuiltinIntents] -> ShowS
show :: GetBuiltinIntents -> String
$cshow :: GetBuiltinIntents -> String
showsPrec :: Int -> GetBuiltinIntents -> ShowS
$cshowsPrec :: Int -> GetBuiltinIntents -> ShowS
Prelude.Show, forall x. Rep GetBuiltinIntents x -> GetBuiltinIntents
forall x. GetBuiltinIntents -> Rep GetBuiltinIntents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetBuiltinIntents x -> GetBuiltinIntents
$cfrom :: forall x. GetBuiltinIntents -> Rep GetBuiltinIntents x
Prelude.Generic)

-- |
-- Create a value of 'GetBuiltinIntents' 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:
--
-- 'locale', 'getBuiltinIntents_locale' - A list of locales that the intent supports.
--
-- 'maxResults', 'getBuiltinIntents_maxResults' - The maximum number of intents to return in the response. The default is
-- 10.
--
-- 'nextToken', 'getBuiltinIntents_nextToken' - A pagination token that fetches the next page of intents. If this API
-- call is truncated, Amazon Lex returns a pagination token in the
-- response. To fetch the next page of intents, use the pagination token in
-- the next request.
--
-- 'signatureContains', 'getBuiltinIntents_signatureContains' - Substring to match in built-in intent signatures. An intent will be
-- returned if any part of its signature matches the substring. For
-- example, \"xyz\" matches both \"xyzabc\" and \"abcxyz.\" To find the
-- signature for an intent, see
-- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents Standard Built-in Intents>
-- in the /Alexa Skills Kit/.
newGetBuiltinIntents ::
  GetBuiltinIntents
newGetBuiltinIntents :: GetBuiltinIntents
newGetBuiltinIntents =
  GetBuiltinIntents'
    { $sel:locale:GetBuiltinIntents' :: Maybe Locale
locale = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetBuiltinIntents' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetBuiltinIntents' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:signatureContains:GetBuiltinIntents' :: Maybe Text
signatureContains = forall a. Maybe a
Prelude.Nothing
    }

-- | A list of locales that the intent supports.
getBuiltinIntents_locale :: Lens.Lens' GetBuiltinIntents (Prelude.Maybe Locale)
getBuiltinIntents_locale :: Lens' GetBuiltinIntents (Maybe Locale)
getBuiltinIntents_locale = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinIntents' {Maybe Locale
locale :: Maybe Locale
$sel:locale:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Locale
locale} -> Maybe Locale
locale) (\s :: GetBuiltinIntents
s@GetBuiltinIntents' {} Maybe Locale
a -> GetBuiltinIntents
s {$sel:locale:GetBuiltinIntents' :: Maybe Locale
locale = Maybe Locale
a} :: GetBuiltinIntents)

-- | The maximum number of intents to return in the response. The default is
-- 10.
getBuiltinIntents_maxResults :: Lens.Lens' GetBuiltinIntents (Prelude.Maybe Prelude.Natural)
getBuiltinIntents_maxResults :: Lens' GetBuiltinIntents (Maybe Natural)
getBuiltinIntents_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinIntents' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetBuiltinIntents
s@GetBuiltinIntents' {} Maybe Natural
a -> GetBuiltinIntents
s {$sel:maxResults:GetBuiltinIntents' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetBuiltinIntents)

-- | A pagination token that fetches the next page of intents. If this API
-- call is truncated, Amazon Lex returns a pagination token in the
-- response. To fetch the next page of intents, use the pagination token in
-- the next request.
getBuiltinIntents_nextToken :: Lens.Lens' GetBuiltinIntents (Prelude.Maybe Prelude.Text)
getBuiltinIntents_nextToken :: Lens' GetBuiltinIntents (Maybe Text)
getBuiltinIntents_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinIntents' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetBuiltinIntents
s@GetBuiltinIntents' {} Maybe Text
a -> GetBuiltinIntents
s {$sel:nextToken:GetBuiltinIntents' :: Maybe Text
nextToken = Maybe Text
a} :: GetBuiltinIntents)

-- | Substring to match in built-in intent signatures. An intent will be
-- returned if any part of its signature matches the substring. For
-- example, \"xyz\" matches both \"xyzabc\" and \"abcxyz.\" To find the
-- signature for an intent, see
-- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents Standard Built-in Intents>
-- in the /Alexa Skills Kit/.
getBuiltinIntents_signatureContains :: Lens.Lens' GetBuiltinIntents (Prelude.Maybe Prelude.Text)
getBuiltinIntents_signatureContains :: Lens' GetBuiltinIntents (Maybe Text)
getBuiltinIntents_signatureContains = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinIntents' {Maybe Text
signatureContains :: Maybe Text
$sel:signatureContains:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Text
signatureContains} -> Maybe Text
signatureContains) (\s :: GetBuiltinIntents
s@GetBuiltinIntents' {} Maybe Text
a -> GetBuiltinIntents
s {$sel:signatureContains:GetBuiltinIntents' :: Maybe Text
signatureContains = Maybe Text
a} :: GetBuiltinIntents)

instance Core.AWSPager GetBuiltinIntents where
  page :: GetBuiltinIntents
-> AWSResponse GetBuiltinIntents -> Maybe GetBuiltinIntents
page GetBuiltinIntents
rq AWSResponse GetBuiltinIntents
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetBuiltinIntents
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetBuiltinIntentsResponse (Maybe Text)
getBuiltinIntentsResponse_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 GetBuiltinIntents
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetBuiltinIntentsResponse (Maybe [BuiltinIntentMetadata])
getBuiltinIntentsResponse_intents
            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
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ GetBuiltinIntents
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetBuiltinIntents (Maybe Text)
getBuiltinIntents_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetBuiltinIntents
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetBuiltinIntentsResponse (Maybe Text)
getBuiltinIntentsResponse_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 GetBuiltinIntents where
  type
    AWSResponse GetBuiltinIntents =
      GetBuiltinIntentsResponse
  request :: (Service -> Service)
-> GetBuiltinIntents -> Request GetBuiltinIntents
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetBuiltinIntents
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetBuiltinIntents)))
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 [BuiltinIntentMetadata]
-> Maybe Text -> Int -> GetBuiltinIntentsResponse
GetBuiltinIntentsResponse'
            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
"intents" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetBuiltinIntents where
  hashWithSalt :: Int -> GetBuiltinIntents -> Int
hashWithSalt Int
_salt GetBuiltinIntents' {Maybe Natural
Maybe Text
Maybe Locale
signatureContains :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
locale :: Maybe Locale
$sel:signatureContains:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Text
$sel:nextToken:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Text
$sel:maxResults:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Natural
$sel:locale:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Locale
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Locale
locale
      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` Maybe Text
signatureContains

instance Prelude.NFData GetBuiltinIntents where
  rnf :: GetBuiltinIntents -> ()
rnf GetBuiltinIntents' {Maybe Natural
Maybe Text
Maybe Locale
signatureContains :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
locale :: Maybe Locale
$sel:signatureContains:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Text
$sel:nextToken:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Text
$sel:maxResults:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Natural
$sel:locale:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Locale
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Locale
locale
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
signatureContains

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

instance Data.ToPath GetBuiltinIntents where
  toPath :: GetBuiltinIntents -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/builtins/intents/"

instance Data.ToQuery GetBuiltinIntents where
  toQuery :: GetBuiltinIntents -> QueryString
toQuery GetBuiltinIntents' {Maybe Natural
Maybe Text
Maybe Locale
signatureContains :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
locale :: Maybe Locale
$sel:signatureContains:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Text
$sel:nextToken:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Text
$sel:maxResults:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Natural
$sel:locale:GetBuiltinIntents' :: GetBuiltinIntents -> Maybe Locale
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"locale" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Locale
locale,
        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,
        ByteString
"signatureContains" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
signatureContains
      ]

-- | /See:/ 'newGetBuiltinIntentsResponse' smart constructor.
data GetBuiltinIntentsResponse = GetBuiltinIntentsResponse'
  { -- | An array of @builtinIntentMetadata@ objects, one for each intent in the
    -- response.
    GetBuiltinIntentsResponse -> Maybe [BuiltinIntentMetadata]
intents :: Prelude.Maybe [BuiltinIntentMetadata],
    -- | A pagination token that fetches the next page of intents. If the
    -- response to this API call is truncated, Amazon Lex returns a pagination
    -- token in the response. To fetch the next page of intents, specify the
    -- pagination token in the next request.
    GetBuiltinIntentsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetBuiltinIntentsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBuiltinIntentsResponse -> GetBuiltinIntentsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBuiltinIntentsResponse -> GetBuiltinIntentsResponse -> Bool
$c/= :: GetBuiltinIntentsResponse -> GetBuiltinIntentsResponse -> Bool
== :: GetBuiltinIntentsResponse -> GetBuiltinIntentsResponse -> Bool
$c== :: GetBuiltinIntentsResponse -> GetBuiltinIntentsResponse -> Bool
Prelude.Eq, ReadPrec [GetBuiltinIntentsResponse]
ReadPrec GetBuiltinIntentsResponse
Int -> ReadS GetBuiltinIntentsResponse
ReadS [GetBuiltinIntentsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBuiltinIntentsResponse]
$creadListPrec :: ReadPrec [GetBuiltinIntentsResponse]
readPrec :: ReadPrec GetBuiltinIntentsResponse
$creadPrec :: ReadPrec GetBuiltinIntentsResponse
readList :: ReadS [GetBuiltinIntentsResponse]
$creadList :: ReadS [GetBuiltinIntentsResponse]
readsPrec :: Int -> ReadS GetBuiltinIntentsResponse
$creadsPrec :: Int -> ReadS GetBuiltinIntentsResponse
Prelude.Read, Int -> GetBuiltinIntentsResponse -> ShowS
[GetBuiltinIntentsResponse] -> ShowS
GetBuiltinIntentsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBuiltinIntentsResponse] -> ShowS
$cshowList :: [GetBuiltinIntentsResponse] -> ShowS
show :: GetBuiltinIntentsResponse -> String
$cshow :: GetBuiltinIntentsResponse -> String
showsPrec :: Int -> GetBuiltinIntentsResponse -> ShowS
$cshowsPrec :: Int -> GetBuiltinIntentsResponse -> ShowS
Prelude.Show, forall x.
Rep GetBuiltinIntentsResponse x -> GetBuiltinIntentsResponse
forall x.
GetBuiltinIntentsResponse -> Rep GetBuiltinIntentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBuiltinIntentsResponse x -> GetBuiltinIntentsResponse
$cfrom :: forall x.
GetBuiltinIntentsResponse -> Rep GetBuiltinIntentsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBuiltinIntentsResponse' 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:
--
-- 'intents', 'getBuiltinIntentsResponse_intents' - An array of @builtinIntentMetadata@ objects, one for each intent in the
-- response.
--
-- 'nextToken', 'getBuiltinIntentsResponse_nextToken' - A pagination token that fetches the next page of intents. If the
-- response to this API call is truncated, Amazon Lex returns a pagination
-- token in the response. To fetch the next page of intents, specify the
-- pagination token in the next request.
--
-- 'httpStatus', 'getBuiltinIntentsResponse_httpStatus' - The response's http status code.
newGetBuiltinIntentsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBuiltinIntentsResponse
newGetBuiltinIntentsResponse :: Int -> GetBuiltinIntentsResponse
newGetBuiltinIntentsResponse Int
pHttpStatus_ =
  GetBuiltinIntentsResponse'
    { $sel:intents:GetBuiltinIntentsResponse' :: Maybe [BuiltinIntentMetadata]
intents =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetBuiltinIntentsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBuiltinIntentsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of @builtinIntentMetadata@ objects, one for each intent in the
-- response.
getBuiltinIntentsResponse_intents :: Lens.Lens' GetBuiltinIntentsResponse (Prelude.Maybe [BuiltinIntentMetadata])
getBuiltinIntentsResponse_intents :: Lens' GetBuiltinIntentsResponse (Maybe [BuiltinIntentMetadata])
getBuiltinIntentsResponse_intents = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinIntentsResponse' {Maybe [BuiltinIntentMetadata]
intents :: Maybe [BuiltinIntentMetadata]
$sel:intents:GetBuiltinIntentsResponse' :: GetBuiltinIntentsResponse -> Maybe [BuiltinIntentMetadata]
intents} -> Maybe [BuiltinIntentMetadata]
intents) (\s :: GetBuiltinIntentsResponse
s@GetBuiltinIntentsResponse' {} Maybe [BuiltinIntentMetadata]
a -> GetBuiltinIntentsResponse
s {$sel:intents:GetBuiltinIntentsResponse' :: Maybe [BuiltinIntentMetadata]
intents = Maybe [BuiltinIntentMetadata]
a} :: GetBuiltinIntentsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A pagination token that fetches the next page of intents. If the
-- response to this API call is truncated, Amazon Lex returns a pagination
-- token in the response. To fetch the next page of intents, specify the
-- pagination token in the next request.
getBuiltinIntentsResponse_nextToken :: Lens.Lens' GetBuiltinIntentsResponse (Prelude.Maybe Prelude.Text)
getBuiltinIntentsResponse_nextToken :: Lens' GetBuiltinIntentsResponse (Maybe Text)
getBuiltinIntentsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinIntentsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetBuiltinIntentsResponse' :: GetBuiltinIntentsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetBuiltinIntentsResponse
s@GetBuiltinIntentsResponse' {} Maybe Text
a -> GetBuiltinIntentsResponse
s {$sel:nextToken:GetBuiltinIntentsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetBuiltinIntentsResponse)

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

instance Prelude.NFData GetBuiltinIntentsResponse where
  rnf :: GetBuiltinIntentsResponse -> ()
rnf GetBuiltinIntentsResponse' {Int
Maybe [BuiltinIntentMetadata]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
intents :: Maybe [BuiltinIntentMetadata]
$sel:httpStatus:GetBuiltinIntentsResponse' :: GetBuiltinIntentsResponse -> Int
$sel:nextToken:GetBuiltinIntentsResponse' :: GetBuiltinIntentsResponse -> Maybe Text
$sel:intents:GetBuiltinIntentsResponse' :: GetBuiltinIntentsResponse -> Maybe [BuiltinIntentMetadata]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [BuiltinIntentMetadata]
intents
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus