{-# 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 #-}
module Amazonka.Wisdom.Types.AssistantAssociationData where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Wisdom.Types.AssistantAssociationOutputData
import Amazonka.Wisdom.Types.AssociationType
data AssistantAssociationData = AssistantAssociationData'
{
AssistantAssociationData -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
AssistantAssociationData -> Text
assistantArn :: Prelude.Text,
AssistantAssociationData -> Text
assistantAssociationArn :: Prelude.Text,
AssistantAssociationData -> Text
assistantAssociationId :: Prelude.Text,
AssistantAssociationData -> Text
assistantId :: Prelude.Text,
AssistantAssociationData -> AssistantAssociationOutputData
associationData :: AssistantAssociationOutputData,
AssistantAssociationData -> AssociationType
associationType :: AssociationType
}
deriving (AssistantAssociationData -> AssistantAssociationData -> Bool
(AssistantAssociationData -> AssistantAssociationData -> Bool)
-> (AssistantAssociationData -> AssistantAssociationData -> Bool)
-> Eq AssistantAssociationData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssistantAssociationData -> AssistantAssociationData -> Bool
$c/= :: AssistantAssociationData -> AssistantAssociationData -> Bool
== :: AssistantAssociationData -> AssistantAssociationData -> Bool
$c== :: AssistantAssociationData -> AssistantAssociationData -> Bool
Prelude.Eq, ReadPrec [AssistantAssociationData]
ReadPrec AssistantAssociationData
Int -> ReadS AssistantAssociationData
ReadS [AssistantAssociationData]
(Int -> ReadS AssistantAssociationData)
-> ReadS [AssistantAssociationData]
-> ReadPrec AssistantAssociationData
-> ReadPrec [AssistantAssociationData]
-> Read AssistantAssociationData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssistantAssociationData]
$creadListPrec :: ReadPrec [AssistantAssociationData]
readPrec :: ReadPrec AssistantAssociationData
$creadPrec :: ReadPrec AssistantAssociationData
readList :: ReadS [AssistantAssociationData]
$creadList :: ReadS [AssistantAssociationData]
readsPrec :: Int -> ReadS AssistantAssociationData
$creadsPrec :: Int -> ReadS AssistantAssociationData
Prelude.Read, Int -> AssistantAssociationData -> ShowS
[AssistantAssociationData] -> ShowS
AssistantAssociationData -> String
(Int -> AssistantAssociationData -> ShowS)
-> (AssistantAssociationData -> String)
-> ([AssistantAssociationData] -> ShowS)
-> Show AssistantAssociationData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssistantAssociationData] -> ShowS
$cshowList :: [AssistantAssociationData] -> ShowS
show :: AssistantAssociationData -> String
$cshow :: AssistantAssociationData -> String
showsPrec :: Int -> AssistantAssociationData -> ShowS
$cshowsPrec :: Int -> AssistantAssociationData -> ShowS
Prelude.Show, (forall x.
AssistantAssociationData -> Rep AssistantAssociationData x)
-> (forall x.
Rep AssistantAssociationData x -> AssistantAssociationData)
-> Generic AssistantAssociationData
forall x.
Rep AssistantAssociationData x -> AssistantAssociationData
forall x.
AssistantAssociationData -> Rep AssistantAssociationData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssistantAssociationData x -> AssistantAssociationData
$cfrom :: forall x.
AssistantAssociationData -> Rep AssistantAssociationData x
Prelude.Generic)
newAssistantAssociationData ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
AssistantAssociationOutputData ->
AssociationType ->
AssistantAssociationData
newAssistantAssociationData :: Text
-> Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData
newAssistantAssociationData
Text
pAssistantArn_
Text
pAssistantAssociationArn_
Text
pAssistantAssociationId_
Text
pAssistantId_
AssistantAssociationOutputData
pAssociationData_
AssociationType
pAssociationType_ =
AssistantAssociationData' :: Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData
AssistantAssociationData'
{ $sel:tags:AssistantAssociationData' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:assistantArn:AssistantAssociationData' :: Text
assistantArn = Text
pAssistantArn_,
$sel:assistantAssociationArn:AssistantAssociationData' :: Text
assistantAssociationArn =
Text
pAssistantAssociationArn_,
$sel:assistantAssociationId:AssistantAssociationData' :: Text
assistantAssociationId = Text
pAssistantAssociationId_,
$sel:assistantId:AssistantAssociationData' :: Text
assistantId = Text
pAssistantId_,
$sel:associationData:AssistantAssociationData' :: AssistantAssociationOutputData
associationData = AssistantAssociationOutputData
pAssociationData_,
$sel:associationType:AssistantAssociationData' :: AssociationType
associationType = AssociationType
pAssociationType_
}
assistantAssociationData_tags :: Lens.Lens' AssistantAssociationData (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
assistantAssociationData_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AssistantAssociationData -> f AssistantAssociationData
assistantAssociationData_tags = (AssistantAssociationData -> Maybe (HashMap Text Text))
-> (AssistantAssociationData
-> Maybe (HashMap Text Text) -> AssistantAssociationData)
-> Lens
AssistantAssociationData
AssistantAssociationData
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationData' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:AssistantAssociationData' :: AssistantAssociationData -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: AssistantAssociationData
s@AssistantAssociationData' {} Maybe (HashMap Text Text)
a -> AssistantAssociationData
s {$sel:tags:AssistantAssociationData' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: AssistantAssociationData) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AssistantAssociationData -> f AssistantAssociationData)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AssistantAssociationData
-> f AssistantAssociationData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
assistantAssociationData_assistantArn :: Lens.Lens' AssistantAssociationData Prelude.Text
assistantAssociationData_assistantArn :: (Text -> f Text)
-> AssistantAssociationData -> f AssistantAssociationData
assistantAssociationData_assistantArn = (AssistantAssociationData -> Text)
-> (AssistantAssociationData -> Text -> AssistantAssociationData)
-> Lens AssistantAssociationData AssistantAssociationData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationData' {Text
assistantArn :: Text
$sel:assistantArn:AssistantAssociationData' :: AssistantAssociationData -> Text
assistantArn} -> Text
assistantArn) (\s :: AssistantAssociationData
s@AssistantAssociationData' {} Text
a -> AssistantAssociationData
s {$sel:assistantArn:AssistantAssociationData' :: Text
assistantArn = Text
a} :: AssistantAssociationData)
assistantAssociationData_assistantAssociationArn :: Lens.Lens' AssistantAssociationData Prelude.Text
assistantAssociationData_assistantAssociationArn :: (Text -> f Text)
-> AssistantAssociationData -> f AssistantAssociationData
assistantAssociationData_assistantAssociationArn = (AssistantAssociationData -> Text)
-> (AssistantAssociationData -> Text -> AssistantAssociationData)
-> Lens AssistantAssociationData AssistantAssociationData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationData' {Text
assistantAssociationArn :: Text
$sel:assistantAssociationArn:AssistantAssociationData' :: AssistantAssociationData -> Text
assistantAssociationArn} -> Text
assistantAssociationArn) (\s :: AssistantAssociationData
s@AssistantAssociationData' {} Text
a -> AssistantAssociationData
s {$sel:assistantAssociationArn:AssistantAssociationData' :: Text
assistantAssociationArn = Text
a} :: AssistantAssociationData)
assistantAssociationData_assistantAssociationId :: Lens.Lens' AssistantAssociationData Prelude.Text
assistantAssociationData_assistantAssociationId :: (Text -> f Text)
-> AssistantAssociationData -> f AssistantAssociationData
assistantAssociationData_assistantAssociationId = (AssistantAssociationData -> Text)
-> (AssistantAssociationData -> Text -> AssistantAssociationData)
-> Lens AssistantAssociationData AssistantAssociationData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationData' {Text
assistantAssociationId :: Text
$sel:assistantAssociationId:AssistantAssociationData' :: AssistantAssociationData -> Text
assistantAssociationId} -> Text
assistantAssociationId) (\s :: AssistantAssociationData
s@AssistantAssociationData' {} Text
a -> AssistantAssociationData
s {$sel:assistantAssociationId:AssistantAssociationData' :: Text
assistantAssociationId = Text
a} :: AssistantAssociationData)
assistantAssociationData_assistantId :: Lens.Lens' AssistantAssociationData Prelude.Text
assistantAssociationData_assistantId :: (Text -> f Text)
-> AssistantAssociationData -> f AssistantAssociationData
assistantAssociationData_assistantId = (AssistantAssociationData -> Text)
-> (AssistantAssociationData -> Text -> AssistantAssociationData)
-> Lens AssistantAssociationData AssistantAssociationData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationData' {Text
assistantId :: Text
$sel:assistantId:AssistantAssociationData' :: AssistantAssociationData -> Text
assistantId} -> Text
assistantId) (\s :: AssistantAssociationData
s@AssistantAssociationData' {} Text
a -> AssistantAssociationData
s {$sel:assistantId:AssistantAssociationData' :: Text
assistantId = Text
a} :: AssistantAssociationData)
assistantAssociationData_associationData :: Lens.Lens' AssistantAssociationData AssistantAssociationOutputData
assistantAssociationData_associationData :: (AssistantAssociationOutputData
-> f AssistantAssociationOutputData)
-> AssistantAssociationData -> f AssistantAssociationData
assistantAssociationData_associationData = (AssistantAssociationData -> AssistantAssociationOutputData)
-> (AssistantAssociationData
-> AssistantAssociationOutputData -> AssistantAssociationData)
-> Lens
AssistantAssociationData
AssistantAssociationData
AssistantAssociationOutputData
AssistantAssociationOutputData
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationData' {AssistantAssociationOutputData
associationData :: AssistantAssociationOutputData
$sel:associationData:AssistantAssociationData' :: AssistantAssociationData -> AssistantAssociationOutputData
associationData} -> AssistantAssociationOutputData
associationData) (\s :: AssistantAssociationData
s@AssistantAssociationData' {} AssistantAssociationOutputData
a -> AssistantAssociationData
s {$sel:associationData:AssistantAssociationData' :: AssistantAssociationOutputData
associationData = AssistantAssociationOutputData
a} :: AssistantAssociationData)
assistantAssociationData_associationType :: Lens.Lens' AssistantAssociationData AssociationType
assistantAssociationData_associationType :: (AssociationType -> f AssociationType)
-> AssistantAssociationData -> f AssistantAssociationData
assistantAssociationData_associationType = (AssistantAssociationData -> AssociationType)
-> (AssistantAssociationData
-> AssociationType -> AssistantAssociationData)
-> Lens
AssistantAssociationData
AssistantAssociationData
AssociationType
AssociationType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationData' {AssociationType
associationType :: AssociationType
$sel:associationType:AssistantAssociationData' :: AssistantAssociationData -> AssociationType
associationType} -> AssociationType
associationType) (\s :: AssistantAssociationData
s@AssistantAssociationData' {} AssociationType
a -> AssistantAssociationData
s {$sel:associationType:AssistantAssociationData' :: AssociationType
associationType = AssociationType
a} :: AssistantAssociationData)
instance Core.FromJSON AssistantAssociationData where
parseJSON :: Value -> Parser AssistantAssociationData
parseJSON =
String
-> (Object -> Parser AssistantAssociationData)
-> Value
-> Parser AssistantAssociationData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AssistantAssociationData"
( \Object
x ->
Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData
AssistantAssociationData'
(Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Text
-> Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Text
-> Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData)
-> Parser Text
-> Parser
(Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"assistantArn")
Parser
(Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData)
-> Parser Text
-> Parser
(Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"assistantAssociationArn")
Parser
(Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData)
-> Parser Text
-> Parser
(Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"assistantAssociationId")
Parser
(Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationData)
-> Parser Text
-> Parser
(AssistantAssociationOutputData
-> AssociationType -> AssistantAssociationData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"assistantId")
Parser
(AssistantAssociationOutputData
-> AssociationType -> AssistantAssociationData)
-> Parser AssistantAssociationOutputData
-> Parser (AssociationType -> AssistantAssociationData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AssistantAssociationOutputData
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"associationData")
Parser (AssociationType -> AssistantAssociationData)
-> Parser AssociationType -> Parser AssistantAssociationData
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AssociationType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"associationType")
)
instance Prelude.Hashable AssistantAssociationData
instance Prelude.NFData AssistantAssociationData