{-# 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.AssociatedTranscript
-- 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.AssociatedTranscript 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

-- | The object containing information that associates the recommended
-- intent\/slot type with a conversation.
--
-- /See:/ 'newAssociatedTranscript' smart constructor.
data AssociatedTranscript = AssociatedTranscript'
  { -- | The content of the transcript that meets the search filter criteria. For
    -- the JSON format of the transcript, see
    -- <https://docs.aws.amazon.com/lexv2/latest/dg/designing-output-format.html Output transcript format>.
    AssociatedTranscript -> Maybe Text
transcript :: Prelude.Maybe Prelude.Text
  }
  deriving (AssociatedTranscript -> AssociatedTranscript -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociatedTranscript -> AssociatedTranscript -> Bool
$c/= :: AssociatedTranscript -> AssociatedTranscript -> Bool
== :: AssociatedTranscript -> AssociatedTranscript -> Bool
$c== :: AssociatedTranscript -> AssociatedTranscript -> Bool
Prelude.Eq, ReadPrec [AssociatedTranscript]
ReadPrec AssociatedTranscript
Int -> ReadS AssociatedTranscript
ReadS [AssociatedTranscript]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociatedTranscript]
$creadListPrec :: ReadPrec [AssociatedTranscript]
readPrec :: ReadPrec AssociatedTranscript
$creadPrec :: ReadPrec AssociatedTranscript
readList :: ReadS [AssociatedTranscript]
$creadList :: ReadS [AssociatedTranscript]
readsPrec :: Int -> ReadS AssociatedTranscript
$creadsPrec :: Int -> ReadS AssociatedTranscript
Prelude.Read, Int -> AssociatedTranscript -> ShowS
[AssociatedTranscript] -> ShowS
AssociatedTranscript -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociatedTranscript] -> ShowS
$cshowList :: [AssociatedTranscript] -> ShowS
show :: AssociatedTranscript -> String
$cshow :: AssociatedTranscript -> String
showsPrec :: Int -> AssociatedTranscript -> ShowS
$cshowsPrec :: Int -> AssociatedTranscript -> ShowS
Prelude.Show, forall x. Rep AssociatedTranscript x -> AssociatedTranscript
forall x. AssociatedTranscript -> Rep AssociatedTranscript x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssociatedTranscript x -> AssociatedTranscript
$cfrom :: forall x. AssociatedTranscript -> Rep AssociatedTranscript x
Prelude.Generic)

-- |
-- Create a value of 'AssociatedTranscript' 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:
--
-- 'transcript', 'associatedTranscript_transcript' - The content of the transcript that meets the search filter criteria. For
-- the JSON format of the transcript, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/designing-output-format.html Output transcript format>.
newAssociatedTranscript ::
  AssociatedTranscript
newAssociatedTranscript :: AssociatedTranscript
newAssociatedTranscript =
  AssociatedTranscript' {$sel:transcript:AssociatedTranscript' :: Maybe Text
transcript = forall a. Maybe a
Prelude.Nothing}

-- | The content of the transcript that meets the search filter criteria. For
-- the JSON format of the transcript, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/designing-output-format.html Output transcript format>.
associatedTranscript_transcript :: Lens.Lens' AssociatedTranscript (Prelude.Maybe Prelude.Text)
associatedTranscript_transcript :: Lens' AssociatedTranscript (Maybe Text)
associatedTranscript_transcript = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociatedTranscript' {Maybe Text
transcript :: Maybe Text
$sel:transcript:AssociatedTranscript' :: AssociatedTranscript -> Maybe Text
transcript} -> Maybe Text
transcript) (\s :: AssociatedTranscript
s@AssociatedTranscript' {} Maybe Text
a -> AssociatedTranscript
s {$sel:transcript:AssociatedTranscript' :: Maybe Text
transcript = Maybe Text
a} :: AssociatedTranscript)

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

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

instance Prelude.NFData AssociatedTranscript where
  rnf :: AssociatedTranscript -> ()
rnf AssociatedTranscript' {Maybe Text
transcript :: Maybe Text
$sel:transcript:AssociatedTranscript' :: AssociatedTranscript -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
transcript