{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.LexV2Models.Types.BuiltInIntentSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.LexV2Models.Types.BuiltInIntentSummary 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

-- | Provides summary information about a built-in intent for the
-- <https://docs.aws.amazon.com/lexv2/latest/dg/API_ListBuiltInIntents.html ListBuiltInIntents>
-- operation.
--
-- /See:/ 'newBuiltInIntentSummary' smart constructor.
data BuiltInIntentSummary = BuiltInIntentSummary'
  { -- | The description of the intent.
    BuiltInIntentSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The signature of the built-in intent. Use this to specify the parent
    -- intent of a derived intent.
    BuiltInIntentSummary -> Maybe Text
intentSignature :: Prelude.Maybe Prelude.Text
  }
  deriving (BuiltInIntentSummary -> BuiltInIntentSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BuiltInIntentSummary -> BuiltInIntentSummary -> Bool
$c/= :: BuiltInIntentSummary -> BuiltInIntentSummary -> Bool
== :: BuiltInIntentSummary -> BuiltInIntentSummary -> Bool
$c== :: BuiltInIntentSummary -> BuiltInIntentSummary -> Bool
Prelude.Eq, ReadPrec [BuiltInIntentSummary]
ReadPrec BuiltInIntentSummary
Int -> ReadS BuiltInIntentSummary
ReadS [BuiltInIntentSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BuiltInIntentSummary]
$creadListPrec :: ReadPrec [BuiltInIntentSummary]
readPrec :: ReadPrec BuiltInIntentSummary
$creadPrec :: ReadPrec BuiltInIntentSummary
readList :: ReadS [BuiltInIntentSummary]
$creadList :: ReadS [BuiltInIntentSummary]
readsPrec :: Int -> ReadS BuiltInIntentSummary
$creadsPrec :: Int -> ReadS BuiltInIntentSummary
Prelude.Read, Int -> BuiltInIntentSummary -> ShowS
[BuiltInIntentSummary] -> ShowS
BuiltInIntentSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BuiltInIntentSummary] -> ShowS
$cshowList :: [BuiltInIntentSummary] -> ShowS
show :: BuiltInIntentSummary -> String
$cshow :: BuiltInIntentSummary -> String
showsPrec :: Int -> BuiltInIntentSummary -> ShowS
$cshowsPrec :: Int -> BuiltInIntentSummary -> ShowS
Prelude.Show, forall x. Rep BuiltInIntentSummary x -> BuiltInIntentSummary
forall x. BuiltInIntentSummary -> Rep BuiltInIntentSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BuiltInIntentSummary x -> BuiltInIntentSummary
$cfrom :: forall x. BuiltInIntentSummary -> Rep BuiltInIntentSummary x
Prelude.Generic)

-- |
-- Create a value of 'BuiltInIntentSummary' 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:
--
-- 'description', 'builtInIntentSummary_description' - The description of the intent.
--
-- 'intentSignature', 'builtInIntentSummary_intentSignature' - The signature of the built-in intent. Use this to specify the parent
-- intent of a derived intent.
newBuiltInIntentSummary ::
  BuiltInIntentSummary
newBuiltInIntentSummary :: BuiltInIntentSummary
newBuiltInIntentSummary =
  BuiltInIntentSummary'
    { $sel:description:BuiltInIntentSummary' :: Maybe Text
description =
        forall a. Maybe a
Prelude.Nothing,
      $sel:intentSignature:BuiltInIntentSummary' :: Maybe Text
intentSignature = forall a. Maybe a
Prelude.Nothing
    }

-- | The description of the intent.
builtInIntentSummary_description :: Lens.Lens' BuiltInIntentSummary (Prelude.Maybe Prelude.Text)
builtInIntentSummary_description :: Lens' BuiltInIntentSummary (Maybe Text)
builtInIntentSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuiltInIntentSummary' {Maybe Text
description :: Maybe Text
$sel:description:BuiltInIntentSummary' :: BuiltInIntentSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: BuiltInIntentSummary
s@BuiltInIntentSummary' {} Maybe Text
a -> BuiltInIntentSummary
s {$sel:description:BuiltInIntentSummary' :: Maybe Text
description = Maybe Text
a} :: BuiltInIntentSummary)

-- | The signature of the built-in intent. Use this to specify the parent
-- intent of a derived intent.
builtInIntentSummary_intentSignature :: Lens.Lens' BuiltInIntentSummary (Prelude.Maybe Prelude.Text)
builtInIntentSummary_intentSignature :: Lens' BuiltInIntentSummary (Maybe Text)
builtInIntentSummary_intentSignature = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuiltInIntentSummary' {Maybe Text
intentSignature :: Maybe Text
$sel:intentSignature:BuiltInIntentSummary' :: BuiltInIntentSummary -> Maybe Text
intentSignature} -> Maybe Text
intentSignature) (\s :: BuiltInIntentSummary
s@BuiltInIntentSummary' {} Maybe Text
a -> BuiltInIntentSummary
s {$sel:intentSignature:BuiltInIntentSummary' :: Maybe Text
intentSignature = Maybe Text
a} :: BuiltInIntentSummary)

instance Data.FromJSON BuiltInIntentSummary where
  parseJSON :: Value -> Parser BuiltInIntentSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BuiltInIntentSummary"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> BuiltInIntentSummary
BuiltInIntentSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"intentSignature")
      )

instance Prelude.Hashable BuiltInIntentSummary where
  hashWithSalt :: Int -> BuiltInIntentSummary -> Int
hashWithSalt Int
_salt BuiltInIntentSummary' {Maybe Text
intentSignature :: Maybe Text
description :: Maybe Text
$sel:intentSignature:BuiltInIntentSummary' :: BuiltInIntentSummary -> Maybe Text
$sel:description:BuiltInIntentSummary' :: BuiltInIntentSummary -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
intentSignature

instance Prelude.NFData BuiltInIntentSummary where
  rnf :: BuiltInIntentSummary -> ()
rnf BuiltInIntentSummary' {Maybe Text
intentSignature :: Maybe Text
description :: Maybe Text
$sel:intentSignature:BuiltInIntentSummary' :: BuiltInIntentSummary -> Maybe Text
$sel:description:BuiltInIntentSummary' :: BuiltInIntentSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
intentSignature