{-# 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.AssistantData where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Wisdom.Types.AssistantStatus
import Amazonka.Wisdom.Types.AssistantType
import Amazonka.Wisdom.Types.ServerSideEncryptionConfiguration
data AssistantData = AssistantData'
{
AssistantData -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
AssistantData -> Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration :: Prelude.Maybe ServerSideEncryptionConfiguration,
AssistantData -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
AssistantData -> Text
assistantArn :: Prelude.Text,
AssistantData -> Text
assistantId :: Prelude.Text,
AssistantData -> Text
name :: Prelude.Text,
AssistantData -> AssistantStatus
status :: AssistantStatus,
AssistantData -> AssistantType
type' :: AssistantType
}
deriving (AssistantData -> AssistantData -> Bool
(AssistantData -> AssistantData -> Bool)
-> (AssistantData -> AssistantData -> Bool) -> Eq AssistantData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssistantData -> AssistantData -> Bool
$c/= :: AssistantData -> AssistantData -> Bool
== :: AssistantData -> AssistantData -> Bool
$c== :: AssistantData -> AssistantData -> Bool
Prelude.Eq, ReadPrec [AssistantData]
ReadPrec AssistantData
Int -> ReadS AssistantData
ReadS [AssistantData]
(Int -> ReadS AssistantData)
-> ReadS [AssistantData]
-> ReadPrec AssistantData
-> ReadPrec [AssistantData]
-> Read AssistantData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssistantData]
$creadListPrec :: ReadPrec [AssistantData]
readPrec :: ReadPrec AssistantData
$creadPrec :: ReadPrec AssistantData
readList :: ReadS [AssistantData]
$creadList :: ReadS [AssistantData]
readsPrec :: Int -> ReadS AssistantData
$creadsPrec :: Int -> ReadS AssistantData
Prelude.Read, Int -> AssistantData -> ShowS
[AssistantData] -> ShowS
AssistantData -> String
(Int -> AssistantData -> ShowS)
-> (AssistantData -> String)
-> ([AssistantData] -> ShowS)
-> Show AssistantData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssistantData] -> ShowS
$cshowList :: [AssistantData] -> ShowS
show :: AssistantData -> String
$cshow :: AssistantData -> String
showsPrec :: Int -> AssistantData -> ShowS
$cshowsPrec :: Int -> AssistantData -> ShowS
Prelude.Show, (forall x. AssistantData -> Rep AssistantData x)
-> (forall x. Rep AssistantData x -> AssistantData)
-> Generic AssistantData
forall x. Rep AssistantData x -> AssistantData
forall x. AssistantData -> Rep AssistantData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssistantData x -> AssistantData
$cfrom :: forall x. AssistantData -> Rep AssistantData x
Prelude.Generic)
newAssistantData ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
AssistantStatus ->
AssistantType ->
AssistantData
newAssistantData :: Text
-> Text
-> Text
-> AssistantStatus
-> AssistantType
-> AssistantData
newAssistantData
Text
pAssistantArn_
Text
pAssistantId_
Text
pName_
AssistantStatus
pStatus_
AssistantType
pType_ =
AssistantData' :: Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> AssistantStatus
-> AssistantType
-> AssistantData
AssistantData'
{ $sel:description:AssistantData' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serverSideEncryptionConfiguration:AssistantData' :: Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration = Maybe ServerSideEncryptionConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:tags:AssistantData' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:assistantArn:AssistantData' :: Text
assistantArn = Text
pAssistantArn_,
$sel:assistantId:AssistantData' :: Text
assistantId = Text
pAssistantId_,
$sel:name:AssistantData' :: Text
name = Text
pName_,
$sel:status:AssistantData' :: AssistantStatus
status = AssistantStatus
pStatus_,
$sel:type':AssistantData' :: AssistantType
type' = AssistantType
pType_
}
assistantData_description :: Lens.Lens' AssistantData (Prelude.Maybe Prelude.Text)
assistantData_description :: (Maybe Text -> f (Maybe Text)) -> AssistantData -> f AssistantData
assistantData_description = (AssistantData -> Maybe Text)
-> (AssistantData -> Maybe Text -> AssistantData)
-> Lens AssistantData AssistantData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantData' {Maybe Text
description :: Maybe Text
$sel:description:AssistantData' :: AssistantData -> Maybe Text
description} -> Maybe Text
description) (\s :: AssistantData
s@AssistantData' {} Maybe Text
a -> AssistantData
s {$sel:description:AssistantData' :: Maybe Text
description = Maybe Text
a} :: AssistantData)
assistantData_serverSideEncryptionConfiguration :: Lens.Lens' AssistantData (Prelude.Maybe ServerSideEncryptionConfiguration)
assistantData_serverSideEncryptionConfiguration :: (Maybe ServerSideEncryptionConfiguration
-> f (Maybe ServerSideEncryptionConfiguration))
-> AssistantData -> f AssistantData
assistantData_serverSideEncryptionConfiguration = (AssistantData -> Maybe ServerSideEncryptionConfiguration)
-> (AssistantData
-> Maybe ServerSideEncryptionConfiguration -> AssistantData)
-> Lens
AssistantData
AssistantData
(Maybe ServerSideEncryptionConfiguration)
(Maybe ServerSideEncryptionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantData' {Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration :: Maybe ServerSideEncryptionConfiguration
$sel:serverSideEncryptionConfiguration:AssistantData' :: AssistantData -> Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration} -> Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration) (\s :: AssistantData
s@AssistantData' {} Maybe ServerSideEncryptionConfiguration
a -> AssistantData
s {$sel:serverSideEncryptionConfiguration:AssistantData' :: Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration = Maybe ServerSideEncryptionConfiguration
a} :: AssistantData)
assistantData_tags :: Lens.Lens' AssistantData (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
assistantData_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AssistantData -> f AssistantData
assistantData_tags = (AssistantData -> Maybe (HashMap Text Text))
-> (AssistantData -> Maybe (HashMap Text Text) -> AssistantData)
-> Lens
AssistantData
AssistantData
(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 (\AssistantData' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:AssistantData' :: AssistantData -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: AssistantData
s@AssistantData' {} Maybe (HashMap Text Text)
a -> AssistantData
s {$sel:tags:AssistantData' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: AssistantData) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AssistantData -> f AssistantData)
-> ((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)))
-> AssistantData
-> f AssistantData
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
assistantData_assistantArn :: Lens.Lens' AssistantData Prelude.Text
assistantData_assistantArn :: (Text -> f Text) -> AssistantData -> f AssistantData
assistantData_assistantArn = (AssistantData -> Text)
-> (AssistantData -> Text -> AssistantData)
-> Lens AssistantData AssistantData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantData' {Text
assistantArn :: Text
$sel:assistantArn:AssistantData' :: AssistantData -> Text
assistantArn} -> Text
assistantArn) (\s :: AssistantData
s@AssistantData' {} Text
a -> AssistantData
s {$sel:assistantArn:AssistantData' :: Text
assistantArn = Text
a} :: AssistantData)
assistantData_assistantId :: Lens.Lens' AssistantData Prelude.Text
assistantData_assistantId :: (Text -> f Text) -> AssistantData -> f AssistantData
assistantData_assistantId = (AssistantData -> Text)
-> (AssistantData -> Text -> AssistantData)
-> Lens AssistantData AssistantData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantData' {Text
assistantId :: Text
$sel:assistantId:AssistantData' :: AssistantData -> Text
assistantId} -> Text
assistantId) (\s :: AssistantData
s@AssistantData' {} Text
a -> AssistantData
s {$sel:assistantId:AssistantData' :: Text
assistantId = Text
a} :: AssistantData)
assistantData_name :: Lens.Lens' AssistantData Prelude.Text
assistantData_name :: (Text -> f Text) -> AssistantData -> f AssistantData
assistantData_name = (AssistantData -> Text)
-> (AssistantData -> Text -> AssistantData)
-> Lens AssistantData AssistantData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantData' {Text
name :: Text
$sel:name:AssistantData' :: AssistantData -> Text
name} -> Text
name) (\s :: AssistantData
s@AssistantData' {} Text
a -> AssistantData
s {$sel:name:AssistantData' :: Text
name = Text
a} :: AssistantData)
assistantData_status :: Lens.Lens' AssistantData AssistantStatus
assistantData_status :: (AssistantStatus -> f AssistantStatus)
-> AssistantData -> f AssistantData
assistantData_status = (AssistantData -> AssistantStatus)
-> (AssistantData -> AssistantStatus -> AssistantData)
-> Lens AssistantData AssistantData AssistantStatus AssistantStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantData' {AssistantStatus
status :: AssistantStatus
$sel:status:AssistantData' :: AssistantData -> AssistantStatus
status} -> AssistantStatus
status) (\s :: AssistantData
s@AssistantData' {} AssistantStatus
a -> AssistantData
s {$sel:status:AssistantData' :: AssistantStatus
status = AssistantStatus
a} :: AssistantData)
assistantData_type :: Lens.Lens' AssistantData AssistantType
assistantData_type :: (AssistantType -> f AssistantType)
-> AssistantData -> f AssistantData
assistantData_type = (AssistantData -> AssistantType)
-> (AssistantData -> AssistantType -> AssistantData)
-> Lens AssistantData AssistantData AssistantType AssistantType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantData' {AssistantType
type' :: AssistantType
$sel:type':AssistantData' :: AssistantData -> AssistantType
type'} -> AssistantType
type') (\s :: AssistantData
s@AssistantData' {} AssistantType
a -> AssistantData
s {$sel:type':AssistantData' :: AssistantType
type' = AssistantType
a} :: AssistantData)
instance Core.FromJSON AssistantData where
parseJSON :: Value -> Parser AssistantData
parseJSON =
String
-> (Object -> Parser AssistantData)
-> Value
-> Parser AssistantData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AssistantData"
( \Object
x ->
Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> AssistantStatus
-> AssistantType
-> AssistantData
AssistantData'
(Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> AssistantStatus
-> AssistantType
-> AssistantData)
-> Parser (Maybe Text)
-> Parser
(Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> AssistantStatus
-> AssistantType
-> AssistantData)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
Parser
(Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> AssistantStatus
-> AssistantType
-> AssistantData)
-> Parser (Maybe ServerSideEncryptionConfiguration)
-> Parser
(Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> AssistantStatus
-> AssistantType
-> AssistantData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ServerSideEncryptionConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serverSideEncryptionConfiguration")
Parser
(Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> AssistantStatus
-> AssistantType
-> AssistantData)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Text
-> Text
-> Text
-> AssistantStatus
-> AssistantType
-> AssistantData)
forall (f :: * -> *) a b. Applicative f => 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
-> AssistantStatus
-> AssistantType
-> AssistantData)
-> Parser Text
-> Parser
(Text -> Text -> AssistantStatus -> AssistantType -> AssistantData)
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 -> AssistantStatus -> AssistantType -> AssistantData)
-> Parser Text
-> Parser
(Text -> AssistantStatus -> AssistantType -> AssistantData)
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 (Text -> AssistantStatus -> AssistantType -> AssistantData)
-> Parser Text
-> Parser (AssistantStatus -> AssistantType -> AssistantData)
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
"name")
Parser (AssistantStatus -> AssistantType -> AssistantData)
-> Parser AssistantStatus
-> Parser (AssistantType -> AssistantData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AssistantStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser (AssistantType -> AssistantData)
-> Parser AssistantType -> Parser AssistantData
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AssistantType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"type")
)
instance Prelude.Hashable AssistantData
instance Prelude.NFData AssistantData