{-# 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.SessionSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SessionSummary = SessionSummary'
{
SessionSummary -> Text
assistantArn :: Prelude.Text,
SessionSummary -> Text
assistantId :: Prelude.Text,
SessionSummary -> Text
sessionArn :: Prelude.Text,
SessionSummary -> Text
sessionId :: Prelude.Text
}
deriving (SessionSummary -> SessionSummary -> Bool
(SessionSummary -> SessionSummary -> Bool)
-> (SessionSummary -> SessionSummary -> Bool) -> Eq SessionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SessionSummary -> SessionSummary -> Bool
$c/= :: SessionSummary -> SessionSummary -> Bool
== :: SessionSummary -> SessionSummary -> Bool
$c== :: SessionSummary -> SessionSummary -> Bool
Prelude.Eq, ReadPrec [SessionSummary]
ReadPrec SessionSummary
Int -> ReadS SessionSummary
ReadS [SessionSummary]
(Int -> ReadS SessionSummary)
-> ReadS [SessionSummary]
-> ReadPrec SessionSummary
-> ReadPrec [SessionSummary]
-> Read SessionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SessionSummary]
$creadListPrec :: ReadPrec [SessionSummary]
readPrec :: ReadPrec SessionSummary
$creadPrec :: ReadPrec SessionSummary
readList :: ReadS [SessionSummary]
$creadList :: ReadS [SessionSummary]
readsPrec :: Int -> ReadS SessionSummary
$creadsPrec :: Int -> ReadS SessionSummary
Prelude.Read, Int -> SessionSummary -> ShowS
[SessionSummary] -> ShowS
SessionSummary -> String
(Int -> SessionSummary -> ShowS)
-> (SessionSummary -> String)
-> ([SessionSummary] -> ShowS)
-> Show SessionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SessionSummary] -> ShowS
$cshowList :: [SessionSummary] -> ShowS
show :: SessionSummary -> String
$cshow :: SessionSummary -> String
showsPrec :: Int -> SessionSummary -> ShowS
$cshowsPrec :: Int -> SessionSummary -> ShowS
Prelude.Show, (forall x. SessionSummary -> Rep SessionSummary x)
-> (forall x. Rep SessionSummary x -> SessionSummary)
-> Generic SessionSummary
forall x. Rep SessionSummary x -> SessionSummary
forall x. SessionSummary -> Rep SessionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SessionSummary x -> SessionSummary
$cfrom :: forall x. SessionSummary -> Rep SessionSummary x
Prelude.Generic)
newSessionSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
SessionSummary
newSessionSummary :: Text -> Text -> Text -> Text -> SessionSummary
newSessionSummary
Text
pAssistantArn_
Text
pAssistantId_
Text
pSessionArn_
Text
pSessionId_ =
SessionSummary' :: Text -> Text -> Text -> Text -> SessionSummary
SessionSummary'
{ $sel:assistantArn:SessionSummary' :: Text
assistantArn = Text
pAssistantArn_,
$sel:assistantId:SessionSummary' :: Text
assistantId = Text
pAssistantId_,
$sel:sessionArn:SessionSummary' :: Text
sessionArn = Text
pSessionArn_,
$sel:sessionId:SessionSummary' :: Text
sessionId = Text
pSessionId_
}
sessionSummary_assistantArn :: Lens.Lens' SessionSummary Prelude.Text
sessionSummary_assistantArn :: (Text -> f Text) -> SessionSummary -> f SessionSummary
sessionSummary_assistantArn = (SessionSummary -> Text)
-> (SessionSummary -> Text -> SessionSummary)
-> Lens SessionSummary SessionSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SessionSummary' {Text
assistantArn :: Text
$sel:assistantArn:SessionSummary' :: SessionSummary -> Text
assistantArn} -> Text
assistantArn) (\s :: SessionSummary
s@SessionSummary' {} Text
a -> SessionSummary
s {$sel:assistantArn:SessionSummary' :: Text
assistantArn = Text
a} :: SessionSummary)
sessionSummary_assistantId :: Lens.Lens' SessionSummary Prelude.Text
sessionSummary_assistantId :: (Text -> f Text) -> SessionSummary -> f SessionSummary
sessionSummary_assistantId = (SessionSummary -> Text)
-> (SessionSummary -> Text -> SessionSummary)
-> Lens SessionSummary SessionSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SessionSummary' {Text
assistantId :: Text
$sel:assistantId:SessionSummary' :: SessionSummary -> Text
assistantId} -> Text
assistantId) (\s :: SessionSummary
s@SessionSummary' {} Text
a -> SessionSummary
s {$sel:assistantId:SessionSummary' :: Text
assistantId = Text
a} :: SessionSummary)
sessionSummary_sessionArn :: Lens.Lens' SessionSummary Prelude.Text
sessionSummary_sessionArn :: (Text -> f Text) -> SessionSummary -> f SessionSummary
sessionSummary_sessionArn = (SessionSummary -> Text)
-> (SessionSummary -> Text -> SessionSummary)
-> Lens SessionSummary SessionSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SessionSummary' {Text
sessionArn :: Text
$sel:sessionArn:SessionSummary' :: SessionSummary -> Text
sessionArn} -> Text
sessionArn) (\s :: SessionSummary
s@SessionSummary' {} Text
a -> SessionSummary
s {$sel:sessionArn:SessionSummary' :: Text
sessionArn = Text
a} :: SessionSummary)
sessionSummary_sessionId :: Lens.Lens' SessionSummary Prelude.Text
sessionSummary_sessionId :: (Text -> f Text) -> SessionSummary -> f SessionSummary
sessionSummary_sessionId = (SessionSummary -> Text)
-> (SessionSummary -> Text -> SessionSummary)
-> Lens SessionSummary SessionSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SessionSummary' {Text
sessionId :: Text
$sel:sessionId:SessionSummary' :: SessionSummary -> Text
sessionId} -> Text
sessionId) (\s :: SessionSummary
s@SessionSummary' {} Text
a -> SessionSummary
s {$sel:sessionId:SessionSummary' :: Text
sessionId = Text
a} :: SessionSummary)
instance Core.FromJSON SessionSummary where
parseJSON :: Value -> Parser SessionSummary
parseJSON =
String
-> (Object -> Parser SessionSummary)
-> Value
-> Parser SessionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SessionSummary"
( \Object
x ->
Text -> Text -> Text -> Text -> SessionSummary
SessionSummary'
(Text -> Text -> Text -> Text -> SessionSummary)
-> Parser Text -> Parser (Text -> Text -> Text -> SessionSummary)
forall (f :: * -> *) a b. Functor 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 -> SessionSummary)
-> Parser Text -> Parser (Text -> Text -> SessionSummary)
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 -> Text -> SessionSummary)
-> Parser Text -> Parser (Text -> SessionSummary)
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
"sessionArn")
Parser (Text -> SessionSummary)
-> Parser Text -> Parser SessionSummary
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
"sessionId")
)
instance Prelude.Hashable SessionSummary
instance Prelude.NFData SessionSummary