{-# 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.BuiltInSlotTypeSummary
-- 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.BuiltInSlotTypeSummary 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 slot type for the
-- <https://docs.aws.amazon.com/lexv2/latest/dg/API_ListBuiltInSlotTypes.html ListBuiltInSlotTypes>
-- operation.
--
-- /See:/ 'newBuiltInSlotTypeSummary' smart constructor.
data BuiltInSlotTypeSummary = BuiltInSlotTypeSummary'
  { -- | The description of the built-in slot type.
    BuiltInSlotTypeSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The signature of the built-in slot type. Use this to specify the parent
    -- slot type of a derived slot type.
    BuiltInSlotTypeSummary -> Maybe Text
slotTypeSignature :: Prelude.Maybe Prelude.Text
  }
  deriving (BuiltInSlotTypeSummary -> BuiltInSlotTypeSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BuiltInSlotTypeSummary -> BuiltInSlotTypeSummary -> Bool
$c/= :: BuiltInSlotTypeSummary -> BuiltInSlotTypeSummary -> Bool
== :: BuiltInSlotTypeSummary -> BuiltInSlotTypeSummary -> Bool
$c== :: BuiltInSlotTypeSummary -> BuiltInSlotTypeSummary -> Bool
Prelude.Eq, ReadPrec [BuiltInSlotTypeSummary]
ReadPrec BuiltInSlotTypeSummary
Int -> ReadS BuiltInSlotTypeSummary
ReadS [BuiltInSlotTypeSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BuiltInSlotTypeSummary]
$creadListPrec :: ReadPrec [BuiltInSlotTypeSummary]
readPrec :: ReadPrec BuiltInSlotTypeSummary
$creadPrec :: ReadPrec BuiltInSlotTypeSummary
readList :: ReadS [BuiltInSlotTypeSummary]
$creadList :: ReadS [BuiltInSlotTypeSummary]
readsPrec :: Int -> ReadS BuiltInSlotTypeSummary
$creadsPrec :: Int -> ReadS BuiltInSlotTypeSummary
Prelude.Read, Int -> BuiltInSlotTypeSummary -> ShowS
[BuiltInSlotTypeSummary] -> ShowS
BuiltInSlotTypeSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BuiltInSlotTypeSummary] -> ShowS
$cshowList :: [BuiltInSlotTypeSummary] -> ShowS
show :: BuiltInSlotTypeSummary -> String
$cshow :: BuiltInSlotTypeSummary -> String
showsPrec :: Int -> BuiltInSlotTypeSummary -> ShowS
$cshowsPrec :: Int -> BuiltInSlotTypeSummary -> ShowS
Prelude.Show, forall x. Rep BuiltInSlotTypeSummary x -> BuiltInSlotTypeSummary
forall x. BuiltInSlotTypeSummary -> Rep BuiltInSlotTypeSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BuiltInSlotTypeSummary x -> BuiltInSlotTypeSummary
$cfrom :: forall x. BuiltInSlotTypeSummary -> Rep BuiltInSlotTypeSummary x
Prelude.Generic)

-- |
-- Create a value of 'BuiltInSlotTypeSummary' 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', 'builtInSlotTypeSummary_description' - The description of the built-in slot type.
--
-- 'slotTypeSignature', 'builtInSlotTypeSummary_slotTypeSignature' - The signature of the built-in slot type. Use this to specify the parent
-- slot type of a derived slot type.
newBuiltInSlotTypeSummary ::
  BuiltInSlotTypeSummary
newBuiltInSlotTypeSummary :: BuiltInSlotTypeSummary
newBuiltInSlotTypeSummary =
  BuiltInSlotTypeSummary'
    { $sel:description:BuiltInSlotTypeSummary' :: Maybe Text
description =
        forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeSignature:BuiltInSlotTypeSummary' :: Maybe Text
slotTypeSignature = forall a. Maybe a
Prelude.Nothing
    }

-- | The description of the built-in slot type.
builtInSlotTypeSummary_description :: Lens.Lens' BuiltInSlotTypeSummary (Prelude.Maybe Prelude.Text)
builtInSlotTypeSummary_description :: Lens' BuiltInSlotTypeSummary (Maybe Text)
builtInSlotTypeSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuiltInSlotTypeSummary' {Maybe Text
description :: Maybe Text
$sel:description:BuiltInSlotTypeSummary' :: BuiltInSlotTypeSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: BuiltInSlotTypeSummary
s@BuiltInSlotTypeSummary' {} Maybe Text
a -> BuiltInSlotTypeSummary
s {$sel:description:BuiltInSlotTypeSummary' :: Maybe Text
description = Maybe Text
a} :: BuiltInSlotTypeSummary)

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

instance Data.FromJSON BuiltInSlotTypeSummary where
  parseJSON :: Value -> Parser BuiltInSlotTypeSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BuiltInSlotTypeSummary"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> BuiltInSlotTypeSummary
BuiltInSlotTypeSummary'
            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
"slotTypeSignature")
      )

instance Prelude.Hashable BuiltInSlotTypeSummary where
  hashWithSalt :: Int -> BuiltInSlotTypeSummary -> Int
hashWithSalt Int
_salt BuiltInSlotTypeSummary' {Maybe Text
slotTypeSignature :: Maybe Text
description :: Maybe Text
$sel:slotTypeSignature:BuiltInSlotTypeSummary' :: BuiltInSlotTypeSummary -> Maybe Text
$sel:description:BuiltInSlotTypeSummary' :: BuiltInSlotTypeSummary -> 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
slotTypeSignature

instance Prelude.NFData BuiltInSlotTypeSummary where
  rnf :: BuiltInSlotTypeSummary -> ()
rnf BuiltInSlotTypeSummary' {Maybe Text
slotTypeSignature :: Maybe Text
description :: Maybe Text
$sel:slotTypeSignature:BuiltInSlotTypeSummary' :: BuiltInSlotTypeSummary -> Maybe Text
$sel:description:BuiltInSlotTypeSummary' :: BuiltInSlotTypeSummary -> 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
slotTypeSignature