{-# 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.AssistantAssociationSummary 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 AssistantAssociationSummary = AssistantAssociationSummary'
{
AssistantAssociationSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
AssistantAssociationSummary -> Text
assistantArn :: Prelude.Text,
AssistantAssociationSummary -> Text
assistantAssociationArn :: Prelude.Text,
AssistantAssociationSummary -> Text
assistantAssociationId :: Prelude.Text,
AssistantAssociationSummary -> Text
assistantId :: Prelude.Text,
AssistantAssociationSummary -> AssistantAssociationOutputData
associationData :: AssistantAssociationOutputData,
AssistantAssociationSummary -> AssociationType
associationType :: AssociationType
}
deriving (AssistantAssociationSummary -> AssistantAssociationSummary -> Bool
(AssistantAssociationSummary
-> AssistantAssociationSummary -> Bool)
-> (AssistantAssociationSummary
-> AssistantAssociationSummary -> Bool)
-> Eq AssistantAssociationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssistantAssociationSummary -> AssistantAssociationSummary -> Bool
$c/= :: AssistantAssociationSummary -> AssistantAssociationSummary -> Bool
== :: AssistantAssociationSummary -> AssistantAssociationSummary -> Bool
$c== :: AssistantAssociationSummary -> AssistantAssociationSummary -> Bool
Prelude.Eq, ReadPrec [AssistantAssociationSummary]
ReadPrec AssistantAssociationSummary
Int -> ReadS AssistantAssociationSummary
ReadS [AssistantAssociationSummary]
(Int -> ReadS AssistantAssociationSummary)
-> ReadS [AssistantAssociationSummary]
-> ReadPrec AssistantAssociationSummary
-> ReadPrec [AssistantAssociationSummary]
-> Read AssistantAssociationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssistantAssociationSummary]
$creadListPrec :: ReadPrec [AssistantAssociationSummary]
readPrec :: ReadPrec AssistantAssociationSummary
$creadPrec :: ReadPrec AssistantAssociationSummary
readList :: ReadS [AssistantAssociationSummary]
$creadList :: ReadS [AssistantAssociationSummary]
readsPrec :: Int -> ReadS AssistantAssociationSummary
$creadsPrec :: Int -> ReadS AssistantAssociationSummary
Prelude.Read, Int -> AssistantAssociationSummary -> ShowS
[AssistantAssociationSummary] -> ShowS
AssistantAssociationSummary -> String
(Int -> AssistantAssociationSummary -> ShowS)
-> (AssistantAssociationSummary -> String)
-> ([AssistantAssociationSummary] -> ShowS)
-> Show AssistantAssociationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssistantAssociationSummary] -> ShowS
$cshowList :: [AssistantAssociationSummary] -> ShowS
show :: AssistantAssociationSummary -> String
$cshow :: AssistantAssociationSummary -> String
showsPrec :: Int -> AssistantAssociationSummary -> ShowS
$cshowsPrec :: Int -> AssistantAssociationSummary -> ShowS
Prelude.Show, (forall x.
AssistantAssociationSummary -> Rep AssistantAssociationSummary x)
-> (forall x.
Rep AssistantAssociationSummary x -> AssistantAssociationSummary)
-> Generic AssistantAssociationSummary
forall x.
Rep AssistantAssociationSummary x -> AssistantAssociationSummary
forall x.
AssistantAssociationSummary -> Rep AssistantAssociationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssistantAssociationSummary x -> AssistantAssociationSummary
$cfrom :: forall x.
AssistantAssociationSummary -> Rep AssistantAssociationSummary x
Prelude.Generic)
newAssistantAssociationSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
AssistantAssociationOutputData ->
AssociationType ->
AssistantAssociationSummary
newAssistantAssociationSummary :: Text
-> Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationSummary
newAssistantAssociationSummary
Text
pAssistantArn_
Text
pAssistantAssociationArn_
Text
pAssistantAssociationId_
Text
pAssistantId_
AssistantAssociationOutputData
pAssociationData_
AssociationType
pAssociationType_ =
AssistantAssociationSummary' :: Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationSummary
AssistantAssociationSummary'
{ $sel:tags:AssistantAssociationSummary' :: Maybe (HashMap Text Text)
tags =
Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:assistantArn:AssistantAssociationSummary' :: Text
assistantArn = Text
pAssistantArn_,
$sel:assistantAssociationArn:AssistantAssociationSummary' :: Text
assistantAssociationArn =
Text
pAssistantAssociationArn_,
$sel:assistantAssociationId:AssistantAssociationSummary' :: Text
assistantAssociationId =
Text
pAssistantAssociationId_,
$sel:assistantId:AssistantAssociationSummary' :: Text
assistantId = Text
pAssistantId_,
$sel:associationData:AssistantAssociationSummary' :: AssistantAssociationOutputData
associationData = AssistantAssociationOutputData
pAssociationData_,
$sel:associationType:AssistantAssociationSummary' :: AssociationType
associationType = AssociationType
pAssociationType_
}
assistantAssociationSummary_tags :: Lens.Lens' AssistantAssociationSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
assistantAssociationSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AssistantAssociationSummary -> f AssistantAssociationSummary
assistantAssociationSummary_tags = (AssistantAssociationSummary -> Maybe (HashMap Text Text))
-> (AssistantAssociationSummary
-> Maybe (HashMap Text Text) -> AssistantAssociationSummary)
-> Lens
AssistantAssociationSummary
AssistantAssociationSummary
(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 (\AssistantAssociationSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:AssistantAssociationSummary' :: AssistantAssociationSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: AssistantAssociationSummary
s@AssistantAssociationSummary' {} Maybe (HashMap Text Text)
a -> AssistantAssociationSummary
s {$sel:tags:AssistantAssociationSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: AssistantAssociationSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AssistantAssociationSummary -> f AssistantAssociationSummary)
-> ((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)))
-> AssistantAssociationSummary
-> f AssistantAssociationSummary
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
assistantAssociationSummary_assistantArn :: Lens.Lens' AssistantAssociationSummary Prelude.Text
assistantAssociationSummary_assistantArn :: (Text -> f Text)
-> AssistantAssociationSummary -> f AssistantAssociationSummary
assistantAssociationSummary_assistantArn = (AssistantAssociationSummary -> Text)
-> (AssistantAssociationSummary
-> Text -> AssistantAssociationSummary)
-> Lens
AssistantAssociationSummary AssistantAssociationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationSummary' {Text
assistantArn :: Text
$sel:assistantArn:AssistantAssociationSummary' :: AssistantAssociationSummary -> Text
assistantArn} -> Text
assistantArn) (\s :: AssistantAssociationSummary
s@AssistantAssociationSummary' {} Text
a -> AssistantAssociationSummary
s {$sel:assistantArn:AssistantAssociationSummary' :: Text
assistantArn = Text
a} :: AssistantAssociationSummary)
assistantAssociationSummary_assistantAssociationArn :: Lens.Lens' AssistantAssociationSummary Prelude.Text
assistantAssociationSummary_assistantAssociationArn :: (Text -> f Text)
-> AssistantAssociationSummary -> f AssistantAssociationSummary
assistantAssociationSummary_assistantAssociationArn = (AssistantAssociationSummary -> Text)
-> (AssistantAssociationSummary
-> Text -> AssistantAssociationSummary)
-> Lens
AssistantAssociationSummary AssistantAssociationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationSummary' {Text
assistantAssociationArn :: Text
$sel:assistantAssociationArn:AssistantAssociationSummary' :: AssistantAssociationSummary -> Text
assistantAssociationArn} -> Text
assistantAssociationArn) (\s :: AssistantAssociationSummary
s@AssistantAssociationSummary' {} Text
a -> AssistantAssociationSummary
s {$sel:assistantAssociationArn:AssistantAssociationSummary' :: Text
assistantAssociationArn = Text
a} :: AssistantAssociationSummary)
assistantAssociationSummary_assistantAssociationId :: Lens.Lens' AssistantAssociationSummary Prelude.Text
assistantAssociationSummary_assistantAssociationId :: (Text -> f Text)
-> AssistantAssociationSummary -> f AssistantAssociationSummary
assistantAssociationSummary_assistantAssociationId = (AssistantAssociationSummary -> Text)
-> (AssistantAssociationSummary
-> Text -> AssistantAssociationSummary)
-> Lens
AssistantAssociationSummary AssistantAssociationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationSummary' {Text
assistantAssociationId :: Text
$sel:assistantAssociationId:AssistantAssociationSummary' :: AssistantAssociationSummary -> Text
assistantAssociationId} -> Text
assistantAssociationId) (\s :: AssistantAssociationSummary
s@AssistantAssociationSummary' {} Text
a -> AssistantAssociationSummary
s {$sel:assistantAssociationId:AssistantAssociationSummary' :: Text
assistantAssociationId = Text
a} :: AssistantAssociationSummary)
assistantAssociationSummary_assistantId :: Lens.Lens' AssistantAssociationSummary Prelude.Text
assistantAssociationSummary_assistantId :: (Text -> f Text)
-> AssistantAssociationSummary -> f AssistantAssociationSummary
assistantAssociationSummary_assistantId = (AssistantAssociationSummary -> Text)
-> (AssistantAssociationSummary
-> Text -> AssistantAssociationSummary)
-> Lens
AssistantAssociationSummary AssistantAssociationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationSummary' {Text
assistantId :: Text
$sel:assistantId:AssistantAssociationSummary' :: AssistantAssociationSummary -> Text
assistantId} -> Text
assistantId) (\s :: AssistantAssociationSummary
s@AssistantAssociationSummary' {} Text
a -> AssistantAssociationSummary
s {$sel:assistantId:AssistantAssociationSummary' :: Text
assistantId = Text
a} :: AssistantAssociationSummary)
assistantAssociationSummary_associationData :: Lens.Lens' AssistantAssociationSummary AssistantAssociationOutputData
assistantAssociationSummary_associationData :: (AssistantAssociationOutputData
-> f AssistantAssociationOutputData)
-> AssistantAssociationSummary -> f AssistantAssociationSummary
assistantAssociationSummary_associationData = (AssistantAssociationSummary -> AssistantAssociationOutputData)
-> (AssistantAssociationSummary
-> AssistantAssociationOutputData -> AssistantAssociationSummary)
-> Lens
AssistantAssociationSummary
AssistantAssociationSummary
AssistantAssociationOutputData
AssistantAssociationOutputData
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationSummary' {AssistantAssociationOutputData
associationData :: AssistantAssociationOutputData
$sel:associationData:AssistantAssociationSummary' :: AssistantAssociationSummary -> AssistantAssociationOutputData
associationData} -> AssistantAssociationOutputData
associationData) (\s :: AssistantAssociationSummary
s@AssistantAssociationSummary' {} AssistantAssociationOutputData
a -> AssistantAssociationSummary
s {$sel:associationData:AssistantAssociationSummary' :: AssistantAssociationOutputData
associationData = AssistantAssociationOutputData
a} :: AssistantAssociationSummary)
assistantAssociationSummary_associationType :: Lens.Lens' AssistantAssociationSummary AssociationType
assistantAssociationSummary_associationType :: (AssociationType -> f AssociationType)
-> AssistantAssociationSummary -> f AssistantAssociationSummary
assistantAssociationSummary_associationType = (AssistantAssociationSummary -> AssociationType)
-> (AssistantAssociationSummary
-> AssociationType -> AssistantAssociationSummary)
-> Lens
AssistantAssociationSummary
AssistantAssociationSummary
AssociationType
AssociationType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationSummary' {AssociationType
associationType :: AssociationType
$sel:associationType:AssistantAssociationSummary' :: AssistantAssociationSummary -> AssociationType
associationType} -> AssociationType
associationType) (\s :: AssistantAssociationSummary
s@AssistantAssociationSummary' {} AssociationType
a -> AssistantAssociationSummary
s {$sel:associationType:AssistantAssociationSummary' :: AssociationType
associationType = AssociationType
a} :: AssistantAssociationSummary)
instance Core.FromJSON AssistantAssociationSummary where
parseJSON :: Value -> Parser AssistantAssociationSummary
parseJSON =
String
-> (Object -> Parser AssistantAssociationSummary)
-> Value
-> Parser AssistantAssociationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AssistantAssociationSummary"
( \Object
x ->
Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationSummary
AssistantAssociationSummary'
(Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Text
-> Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationSummary)
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
-> AssistantAssociationSummary)
-> Parser Text
-> Parser
(Text
-> Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationSummary)
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
-> AssistantAssociationSummary)
-> Parser Text
-> Parser
(Text
-> Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationSummary)
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
-> AssistantAssociationSummary)
-> Parser Text
-> Parser
(Text
-> AssistantAssociationOutputData
-> AssociationType
-> AssistantAssociationSummary)
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
-> AssistantAssociationSummary)
-> Parser Text
-> Parser
(AssistantAssociationOutputData
-> AssociationType -> AssistantAssociationSummary)
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 -> AssistantAssociationSummary)
-> Parser AssistantAssociationOutputData
-> Parser (AssociationType -> AssistantAssociationSummary)
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 -> AssistantAssociationSummary)
-> Parser AssociationType -> Parser AssistantAssociationSummary
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 AssistantAssociationSummary
instance Prelude.NFData AssistantAssociationSummary