{-# 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.Wisdom.Types.AssistantAssociationOutputData
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Wisdom.Types.AssistantAssociationOutputData where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Wisdom.Types.KnowledgeBaseAssociationData

-- | The data that is output as a result of the assistant association.
--
-- /See:/ 'newAssistantAssociationOutputData' smart constructor.
data AssistantAssociationOutputData = AssistantAssociationOutputData'
  { -- | The knowledge base where output data is sent.
    AssistantAssociationOutputData
-> Maybe KnowledgeBaseAssociationData
knowledgeBaseAssociation :: Prelude.Maybe KnowledgeBaseAssociationData
  }
  deriving (AssistantAssociationOutputData
-> AssistantAssociationOutputData -> Bool
(AssistantAssociationOutputData
 -> AssistantAssociationOutputData -> Bool)
-> (AssistantAssociationOutputData
    -> AssistantAssociationOutputData -> Bool)
-> Eq AssistantAssociationOutputData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssistantAssociationOutputData
-> AssistantAssociationOutputData -> Bool
$c/= :: AssistantAssociationOutputData
-> AssistantAssociationOutputData -> Bool
== :: AssistantAssociationOutputData
-> AssistantAssociationOutputData -> Bool
$c== :: AssistantAssociationOutputData
-> AssistantAssociationOutputData -> Bool
Prelude.Eq, ReadPrec [AssistantAssociationOutputData]
ReadPrec AssistantAssociationOutputData
Int -> ReadS AssistantAssociationOutputData
ReadS [AssistantAssociationOutputData]
(Int -> ReadS AssistantAssociationOutputData)
-> ReadS [AssistantAssociationOutputData]
-> ReadPrec AssistantAssociationOutputData
-> ReadPrec [AssistantAssociationOutputData]
-> Read AssistantAssociationOutputData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssistantAssociationOutputData]
$creadListPrec :: ReadPrec [AssistantAssociationOutputData]
readPrec :: ReadPrec AssistantAssociationOutputData
$creadPrec :: ReadPrec AssistantAssociationOutputData
readList :: ReadS [AssistantAssociationOutputData]
$creadList :: ReadS [AssistantAssociationOutputData]
readsPrec :: Int -> ReadS AssistantAssociationOutputData
$creadsPrec :: Int -> ReadS AssistantAssociationOutputData
Prelude.Read, Int -> AssistantAssociationOutputData -> ShowS
[AssistantAssociationOutputData] -> ShowS
AssistantAssociationOutputData -> String
(Int -> AssistantAssociationOutputData -> ShowS)
-> (AssistantAssociationOutputData -> String)
-> ([AssistantAssociationOutputData] -> ShowS)
-> Show AssistantAssociationOutputData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssistantAssociationOutputData] -> ShowS
$cshowList :: [AssistantAssociationOutputData] -> ShowS
show :: AssistantAssociationOutputData -> String
$cshow :: AssistantAssociationOutputData -> String
showsPrec :: Int -> AssistantAssociationOutputData -> ShowS
$cshowsPrec :: Int -> AssistantAssociationOutputData -> ShowS
Prelude.Show, (forall x.
 AssistantAssociationOutputData
 -> Rep AssistantAssociationOutputData x)
-> (forall x.
    Rep AssistantAssociationOutputData x
    -> AssistantAssociationOutputData)
-> Generic AssistantAssociationOutputData
forall x.
Rep AssistantAssociationOutputData x
-> AssistantAssociationOutputData
forall x.
AssistantAssociationOutputData
-> Rep AssistantAssociationOutputData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssistantAssociationOutputData x
-> AssistantAssociationOutputData
$cfrom :: forall x.
AssistantAssociationOutputData
-> Rep AssistantAssociationOutputData x
Prelude.Generic)

-- |
-- Create a value of 'AssistantAssociationOutputData' 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:
--
-- 'knowledgeBaseAssociation', 'assistantAssociationOutputData_knowledgeBaseAssociation' - The knowledge base where output data is sent.
newAssistantAssociationOutputData ::
  AssistantAssociationOutputData
newAssistantAssociationOutputData :: AssistantAssociationOutputData
newAssistantAssociationOutputData =
  AssistantAssociationOutputData' :: Maybe KnowledgeBaseAssociationData
-> AssistantAssociationOutputData
AssistantAssociationOutputData'
    { $sel:knowledgeBaseAssociation:AssistantAssociationOutputData' :: Maybe KnowledgeBaseAssociationData
knowledgeBaseAssociation =
        Maybe KnowledgeBaseAssociationData
forall a. Maybe a
Prelude.Nothing
    }

-- | The knowledge base where output data is sent.
assistantAssociationOutputData_knowledgeBaseAssociation :: Lens.Lens' AssistantAssociationOutputData (Prelude.Maybe KnowledgeBaseAssociationData)
assistantAssociationOutputData_knowledgeBaseAssociation :: (Maybe KnowledgeBaseAssociationData
 -> f (Maybe KnowledgeBaseAssociationData))
-> AssistantAssociationOutputData
-> f AssistantAssociationOutputData
assistantAssociationOutputData_knowledgeBaseAssociation = (AssistantAssociationOutputData
 -> Maybe KnowledgeBaseAssociationData)
-> (AssistantAssociationOutputData
    -> Maybe KnowledgeBaseAssociationData
    -> AssistantAssociationOutputData)
-> Lens
     AssistantAssociationOutputData
     AssistantAssociationOutputData
     (Maybe KnowledgeBaseAssociationData)
     (Maybe KnowledgeBaseAssociationData)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationOutputData' {Maybe KnowledgeBaseAssociationData
knowledgeBaseAssociation :: Maybe KnowledgeBaseAssociationData
$sel:knowledgeBaseAssociation:AssistantAssociationOutputData' :: AssistantAssociationOutputData
-> Maybe KnowledgeBaseAssociationData
knowledgeBaseAssociation} -> Maybe KnowledgeBaseAssociationData
knowledgeBaseAssociation) (\s :: AssistantAssociationOutputData
s@AssistantAssociationOutputData' {} Maybe KnowledgeBaseAssociationData
a -> AssistantAssociationOutputData
s {$sel:knowledgeBaseAssociation:AssistantAssociationOutputData' :: Maybe KnowledgeBaseAssociationData
knowledgeBaseAssociation = Maybe KnowledgeBaseAssociationData
a} :: AssistantAssociationOutputData)

instance Core.FromJSON AssistantAssociationOutputData where
  parseJSON :: Value -> Parser AssistantAssociationOutputData
parseJSON =
    String
-> (Object -> Parser AssistantAssociationOutputData)
-> Value
-> Parser AssistantAssociationOutputData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AssistantAssociationOutputData"
      ( \Object
x ->
          Maybe KnowledgeBaseAssociationData
-> AssistantAssociationOutputData
AssistantAssociationOutputData'
            (Maybe KnowledgeBaseAssociationData
 -> AssistantAssociationOutputData)
-> Parser (Maybe KnowledgeBaseAssociationData)
-> Parser AssistantAssociationOutputData
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe KnowledgeBaseAssociationData)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"knowledgeBaseAssociation")
      )

instance
  Prelude.Hashable
    AssistantAssociationOutputData

instance
  Prelude.NFData
    AssistantAssociationOutputData